Jeszcze jakby? powiedzia? jakie itemy, to by?bym szcz??liwy.ja chce skrypt pod 8.1 ze jest npc a u niego mozna wymienic jakies itemki na jakis rare items
Parcel system to jest w silniku. A NPC zaraz zrobie.Tak na trade i silnik TFS, a i jak masz to parcel system.
1.Widz? ze 1 skrypt chyba za trudny no to poprosi?bym 2 inne jak najszybciej je?li mo?na.
Client: 8.0
Actions
1.K?adziesz w 4 miejscach 4 przedmioty poci?gasz za d?wignie i tp cie na wybrane miejsce a itemy znikaj?.
2.stajesz w wybranym miejscu poci?gasz za dzwignie i tp cie na wybrane miejsce.
Z g?ry dzi?ki.
function onUse(cid, item, frompos, item2, topos)
local item1Pos = {x=123, y=123, z=7, stackpos=254} -- Pozycja gdzie ma byc 1 item
local item1ID = 1324
local item2Pos = {x=132, y=123, z=7, stackpos=254}
local item2ID = 1234
local item3Pos = {x=132, y=123, z=7, stackpos=254}
local item3ID = 1234
local item4Pos = {x=132, y=123, z=7, stackpos=254}
local item4ID = 1234
local whereTP = {x=123, y=132, z=7} -- Gdzie teleportuje
local items = {item1 = getThingfromPos(item1Pos), item2 = getThingfromPos(item2Pos), item3 = getThingfromPos(item3Pos), item4 = getThingfromPos(item4Pos)}
if (item.itemid == 1945) then
if (items.item1.itemid == item1ID and items.item2.itemid == item2ID and items.item3.itemid == item3ID and items.item4.itemid == item4ID) then
doRemoveItem(items.item1,1)
doRemoveItem(items.item2,1)
doRemoveItem(items.item3,1)
doRemoveItem(items.item4,1)
doTeleportThing(cid,whereTP)
doTransformThing(item,1946)
doSendMagicEffect(item1Pos,CONST_ME_MAGIC_BLUE)
doSendMagicEffect(item2Pos,CONST_ME_MAGIC_BLUE)
doSendMagicEffect(item3Pos,CONST_ME_MAGIC_BLUE)
doSendMagicEffect(item4Pos,CONST_ME_MAGIC_BLUE)
else
doPlayerSendCancel(cid,"Nie sa polozone wlasciwe przedmioty")
end
else
doTransformThing(item,1945)
end
end
function onUse(cid, item, frompos, item2, topos)
local jakiPosMaByc = {x=132, y=132, z=7} -- Na jakim polu gracz ma stawac
local gdzieTP = {x=123, y=123, z=7} -- Gdzie ma teleportowac
if (item.itemid == 1945) then
if (getPlayerPosition(cid) == jakiPosMaByc) then
doTransformThing(item,1945)
doTeleportThing(cid,gdzieTP)
doSendMagicEffect(gdzieTP,CONST_ME_MAGIC_BLUE)
doSendMagicEffect(jakiPosMaByc,CONST_ME_MAGIC_BLUE)
doSendMagicEffect(frompos, CONST_ME_MAGIC_BLUE)
else
doPlayerSendCancel(cid,"Wrong position")
end
else
doTransformThing(item,1946)
end
end
Ok:dziwgnia jak klikasz znika przedmiot ( sciana ) ale jakis dobry bo jak mam 1 taki i jak chce zrobic 2 to nie dziala
function onUse(cid, item, frompos, item2, topos)
local coMaZnikac = {x=123, y=123, z=7} -- Pozycja itemu co ma znikac
local itemZnikajacy = getThingfromPos(coMaZnikac)
if (item.itemid == 1945) then
doRemoveItem(itemZnikajacy,1)
doTransformThing(item,1946)
end
end
function onUse(cid, item, frompos, item2, topos)
local item1Pos = {x=123, y=123, z=7, stackpos=254} -- Pozycja gdzie ma byc 1 item
local item1ID = 1324
local item2Pos = {x=132, y=123, z=7, stackpos=254}
local item2ID = 1234
local item3Pos = {x=132, y=123, z=7, stackpos=254}
local item3ID = 1234
local item4Pos = {x=132, y=123, z=7, stackpos=254}
local item4ID = 1234
local whereTP = {x=123, y=132, z=7} -- Gdzie teleportuje
local items = {item1 = getThingfromPos(item1Pos), item2 = getThingfromPos(item2Pos), item3 = getThingfromPos(item3Pos), item4 = getThingfromPos(item4Pos)}
if (item.itemid == 1945) then
if (items.item1.itemid == item1ID and items.item2.itemid == item2ID and items.item3.itemid == item3ID and items.item4.itemid == item4ID) then
doRemoveItem(items.item1,1)
doRemoveItem(items.item2,1)
doRemoveItem(items.item3,1)
doRemoveItem(items.item4,1)
doTeleportThing(cid,whereTP)
doTransformThing(item,1946)
doSendMagicEffect(item1Pos,CONST_ME_MAGIC_BLUE)
doSendMagicEffect(item2Pos,CONST_ME_MAGIC_BLUE)
doSendMagicEffect(item3Pos,CONST_ME_MAGIC_BLUE)
doSendMagicEffect(item4Pos,CONST_ME_MAGIC_BLUE)
else
doPlayerSendCancel(cid,"Nie sa polozone wlasciwe przedmioty")
end
else
doTransformThing(item,1945)
end
end
Robi? d?wignie na mapie daje jej uniqueid="8894" potem k?ad? itemy naciskam d?wignie i nic si? nie dzieje a ?aden b??d w silniku si? nie pokazuje.<action uniqueid="8894" script="nowadzwignia2.lua" />
A POZYCJE TO JA SE KURWA Z DUPY WYCI?GN??EM!!?? ZMIE? JE, BO NA PEWNO TAKICH NIE MA!! I MI KURWA NIE SPAMUJ.Wszystko fajnie tylko ?e ten skrypt nie chce dzia?a?.
Normalnie dodaje do skrypt?w dodaje linijk? do actions
Robi? d?wignie na mapie daje jej uniqueid="8894" potem k?ad? itemy naciskam d?wignie i nic si? nie dzieje a ?aden b??d w silniku si? nie pokazuje.
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, -4000, 0, -9000)
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end
Wystarczy tylko efekt zmieni? w exevo gran mas vis.Rodzaj :Czar
Tibia :8.1
Co tu powiedzie? chcia?bym Czar taki np jak ExEvo gran mas Mort ;] Dla Sorca I czy Zrobisz jescze Exevo gran mas pox? ;D
ee to ja chce czar ,ze jak go wpisujesz to wokol ciebie barbariany sa zrobisz??
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)
function onCastSpell(cid, var)
local nazwa = "Barbarian Bloodwalker"
local pos = getPlayerPosition(cid)
local summon1 = doSummonCreature(nazwa,{x=pos.x+1, y=pos.y, z=pos.z})
local summon2 = doSummonCreature(nazwa,{x=pos.x-1, y=pos.y, z=pos.z})
local summon3 = doSummonCreature(nazwa,{x=pos.x+1, y=pos.y+1, z=pos.z})
local summon4 = doSummonCreature(nazwa,{x=pos.x+1, y=pos.y-1, z=pos.z})
local summon5 = doSummonCreature(nazwa,{x=pos.x-1, y=pos.y+1, z=pos.z})
local summon6 = doSummonCreature(nazwa,{x=pos.x-1, y=pos.y-1, z=pos.z})
local summon7 = doSummonCreature(nazwa,{x=pos.x, y=pos.y+1, z=pos.z})
local summon8 = doSummonCreature(nazwa,{x=pos.x, y=pos.y-1, z=pos.z})
doConvinceCreature(cid,summon1)
doConvinceCreature(cid,summon2)
doConvinceCreature(cid,summon3)
doConvinceCreature(cid,summon4)
doConvinceCreature(cid,summon5)
doConvinceCreature(cid,summon6)
doConvinceCreature(cid,summon7)
doConvinceCreature(cid,summon8)
return doCombat(cid, combat, var)
end
Podaj mi tylko id tych boots of waterwalking, bo rozumiem, ?e to id to jest woda.typ hm nie wiem
tibia 8.10
jak nadepne na ta wode zco sie pytalem to sprawdza czy mam boots jak nie to mam paralize i zabiera mi po 100 hp a jak wyjde z wody to ma mi przez 5 min isc hp po 50 a i id to 4820
dotroy nie spamuj juz wzioles i napisales ! nie spamuj
Z t? szafk?, to nie mo?na. Jedyne co mo?na, to ?e u?ywamy szafki i wtedy do plecaka nam dodaje, a nie, ?e otwiera si? zawarto?? szafki.Rodzaj: np. actions/movements
Wersja tibii: 7.6
O czym ma by? skrypt. rozkopywanie ziemi, kt?ra znajduje si? na pos x:32775 y:32012 z:10 kilofem.
Rodzaj: np. actions
Wersja tibii: 7.6
O czym ma by? skrypt.
*gdy otworzymy dan? szafk?, znajdujemy bag, a w nim itemy o id (sam wpisze) xxxx,
*gdy otworzymy dan? szafke, znajdujemy item o id xxxx,
*gdy otworzymy dan? szafk?, znajdujemy klucz 3700.
Przepraszam, ?e daj? zam?wienie, gdy jeszcze nie rozwi?za?e? tamtych, jednak zapomnia?bym co chc? dok?adnie ^^
function onUse(cid, item, frompos, item2, topos)
local position = {x=32775, y=32012, z=10}
local idDziury = 1234 -- ID dziury, jaka ma zostawic
local poJakimCzasie = 60*1000 -- Po jakim czasie ma znikac (po 60 sekundach ustawione)
if (topos == position) then
doTransformThing(item, idDziury)
local x = {item = item, itemid = item.itemid}
addEvent(zmien,poJakimCzasie,x)
else
doPlayerSendCancel(cid,"Nie mozesz tego uzyc")
end
end
function zmien(x)
doTransformThing(x.item, x.itemid)
end
Chcia?bym aby? edytowa? ten skrypt:
To sprite wand ale zawsze bije 8-9k a chce ?eby na 10 lvl bi?o max 200 a na 100 oko?o 2k. Czyli ?eby jego moc zale?a?a od lvl i mlvl.Kod:local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, -4000, 0, -9000) function onUseWeapon(cid, var) return doCombat(cid, combat, var) end
Sory, nie przeczyta?em. Masz:Nie wiem czy przeoczy?e? m?j post ale mi zale?y...
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -10.8, -500, -12.2, -1000)
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end
Ok, no to bag z itemami:#Dzi?kuj?, w?a?nie o to mi chodzi?o, ?e otwieramy szafeczk?, na zielono wy?wietla si? "You have found a bag", a w naszym BP mamy baga, w kt?rym jest to co opisa?em ;]
Reput leci ^^
function onUse(cid, item, frompos, item2, topos)
local bagID = 1234 -- Id baga
local itemy = {123, 124, 125} -- Jakie itemy gracz dostanie
local storage = 1582 -- Dla kazdego questu ma byc inny
if (getPlayerStorageValue(cid,storage) == -1) then
local bag = doPlayerAddItem(cid,bagID,1)
for i=0, #itemy do
doAddContainerItem(bag,itemy[i],1)
end
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You have found a bag")
setPlayerStorageValue(cid,storage,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"It\' empty")
end
end
function onUse(cid, item, frompos, item2, topos)
local kluczID = 3700 -- Id klucza
local actionID = 0 -- Actionid klucza. 0 = bez actionid (bez key Id)
local storage = 1583 -- Dla kazdego questu ma byc inny
if (getPlayerStorageValue(cid,storage) == -1) then
local key = doPlayerAddItem(cid,kluczID,1)
if (actionID > 0) then
doSetItemActionId(key,actionID)
end
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You have found a key")
setPlayerStorageValue(cid,storage,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"It\' empty")
end
end
function onUse(cid, item, frompos, item2, topos)
local itemID = 1234 -- Id itemu
local itemName = "leather armor" -- Nazwa itemu
local storage = 1584 -- Dla kazdego questu ma byc inny
if (getPlayerStorageValue(cid,storage) == -1) then
doPlayerAddItem(cid,itemID,1)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You have found a ".. itemName .."")
setPlayerStorageValue(cid,storage,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"It\' empty")
end
end
Warning [NpcScript::NpcScript] Can not load script. data/npc/scripts/profesje.lua
data/npc/scripts/profesje.lua:57: unexcepted symbol near 'then'
local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye then.')
focus = 0
talk_start = 0
end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str ..
'(%w+)'))
end
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Witaj, ' .. getCreatureName(cid) .. '! Zmieniam profesje paladyn i knight na "Epic
Gladiator".')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorki, ' .. getCreatureName(cid) .. '! Ale gadam z kims innym!')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'Epic Gladiator') then
if getPlayerVocation(cid) > 8 then
selfSay('Sorki, ale nie jestes Elite Knightem badz Royal Paladinem.')
elseif getPlayerVocation(cid) < 7 then
selfSay('Sorki, ale nie jestes Elite Knightem badz Royal Paladinem.')
else
selfSay('Czy chcesz stac sie Epic Gladiatorem?') then
talk_state = 1
end
end
elseif talk_state = 1 then
if msgcontains(msg, 'tak') then
if (getPlayerItemCount(cid,5904) >= 15) then
sell(cid,5904,15,0) then
doPlayerSetVocation(cid, 10) then
selfSay('Stales sie Epic Wizardem')
else
selfSay('Nie masz 15 magic sulphur!')
end
end
end
talk_state = 0
elseif msgcontains(msg, 'Epic Wizard') then
if getPlayerVocation(cid) > 6 then
selfSay('Sorki, ale nie jestes Elder Dridem badz Master Sorcererem.')
elseif getPlayerVocation(cid) < 5 then
selfSay('Sorki, ale nie jestes Elder Dridem badz Master Sorcererem.')
else
selfSay('Czy chcesz stac sie Epic Wizardem?') then
talk_state = 2
end
end
elseif talk_state = 2 then
if msgcontains(msg, 'tak') then
if (getPlayerItemCount(cid,5904) >= 15) then
sell(cid,5904,15,0) then
doPlayerSetVocation(cid, 9) then
selfSay('Stales sie Epic Wizardem')
else
selfSay('Nie masz 15 magic sulphur!')
end
end
end
talk_state = 0
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Narazie, ' .. getCreatureName(cid) .. '!')
focus = 0
talk_start = 0
end
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
if focus > 0 then
x, y, z = creatureGetPosition(focus)
myx, myy, myz = selfGetPosition()
if ((myy-y==0) and (myx-x<=0 and myx-x>=-4)) then
selfTurn(1)
end
if ((myy-y==0) and (myx-x>=0 and myx-x<=4)) then
selfTurn(3)
end
if ((myx-x==0) and (myy-y<=0 and myy-y>=-4)) then
selfTurn(2)
end
if ((myx-x==0) and (myy-y>=0 and myy-y<=4)) then
selfTurn(0)
end
if ((myy-y==-2) and (myx-x>=-1 and myx-x<=1)) then
selfTurn(2)
end
if ((myy-y==2) and (myx-x>=-1 and myx-x<=1)) then
selfTurn(0)
end
if ((myx-x==2) and (myy-y>=-1 and myy-y<=1)) then
selfTurn(3)
end
if ((myx-x==-2) and (myy-y>=-1 and myy-y<=1)) then
selfTurn(1)
end
if ((myy-y==-3) and (myx-x>=-2 and myx-x<=2)) then
selfTurn(2)
end
if ((myy-y==3) and (myx-x>=-2 and myx-x<=2)) then
selfTurn(0)
end
if ((myx-x==3) and (myy-y>=-2 and myy-y<=2)) then
selfTurn(3)
end
if ((myx-x==-3) and (myy-y>=-2 and myy-y<=2)) then
selfTurn(1)
end
if ((myy-y==-4) and (myx-x>=-3 and myx-x<=3)) then
selfTurn(2)
end
if ((myy-y==4) and (myx-x>=-3 and myx-x<=3)) then
selfTurn(0)
end
if ((myx-x==4) and (myy-y>=-3 and myy-y<=3)) then
selfTurn(3)
end
if ((myx-x==-4) and (myy-y>=-3 and myy-y<=3)) then
selfTurn(1)
end
end
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Nastepny...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Gdzie maniery?')
focus = 0
end
end
end