• logo_cipsoft
    Nowe serwery zostały otwarte 19 Lut 2025:
    Noctalia (Open PvP) Ignitera (Open PvP) us_logo Xybra (Open PvP)

[7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Status
Zamknięty.
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Wersja tibii : 8.50
Silnik : TFS 0.3.5pl1
Tre?? b??du / opis b??du : Npc nie dzia?a na tfs 0.3.5(pisze hi odpisuje pisze first addon tez odpisuje ale na yes nie reaguje.) B??dy w konsoli :
Kod:
Lua Script Error: [Npc interface]
data/npc/scripts/addons.lua:onCreatureSay

data/lib/function.lua:72: attempt to call global 'isPlayer' (a nil value)
stack traceback:
        data/lib/function.lua:72: in function 'isPlayerPremiumCallback'
        data/npc/scripts/addons.lua:21: in function 'callback'
        data/npc/lib/npcsystem/keywordhandler.lua:40: in function 'processMessage'
        data/npc/lib/npcsystem/keywordhandler.lua:168: in function 'processNodeMessage'
        data/npc/lib/npcsystem/keywordhandler.lua:122: in function 'processMessage'
        data/npc/lib/npcsystem/npchandler.lua:380: in function 'onCreatureSay'
        data/npc/scripts/addons.lua:7: in function <data/npc/scripts/addons.lua:7>
Ewentualne uwagi : Chcia?bym aby?cie przerobili mi ten skrypt, by dzia?a? na TFSie 0.3.5pl1.
Skrypt :
Kod:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)				npcHandler:onCreatureAppear(cid)			end
function onCreatureDisappear(cid) 			npcHandler:onCreatureDisappear(cid)			end
function onCreatureSay(cid, type, msg)			npcHandler:onCreatureSay(cid, type, msg)		end
function onThink()					npcHandler:onThink()					end


function buyAddons(cid, message, keywords, parameters, node)
	--TODO: buyAddons function in modules.lua
	if(not npcHandler:isFocused(cid)) then
		return false
	end

	local addon = parameters.addon
	local cost = parameters.cost
	local premium = (parameters.premium ~= nil and parameters.premium)

	if isPlayerPremiumCallback == nil or (isPlayerPremiumCallback(cid) and premium) then
		if doPlayerRemoveMoney(cid, cost) then
			doPlayerAddAddons(cid, addon)
			npcHandler:say('There, you are now able to use all addons!', cid)
		else
			npcHandler:say('Sorry, you do not have enough money.', cid)
		end
	else
		npcHandler:say('I only serve customers with premium accounts.', cid)
	end

	keywordHandler:moveUp(1)
	return true
end

local node1 = keywordHandler:addKeyword({'first addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the first addons set for 5000 gold coins?'})
	node1:addChildKeyword({'yes'}, buyAddons, {addon = 1, cost = 5000, premium = true})
	node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Too expensive, eh?'})

local node2 = keywordHandler:addKeyword({'second addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to buy the second addons set for 10000 gold coins?'})
	node2:addChildKeyword({'yes'}, buyAddons, {addon = 2, cost = 10000, premium = true})
	node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Too expensive, eh?'})

keywordHandler:addKeyword({'addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell the first addons set for 5000 gold coins and the second addons set for 10000 gold coins.'})

npcHandler:addModule(FocusModule:new())
 
Ostatnia edycja:
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Wersja tibii : 8.50
Silnik : TFS 0.3.4PL2
Tre?? b??du / opis b??du : chce by tworzylo demony na danych pozycjach jest to quest annihilator.

x=1659 y=339 z=13
x=1661 y=339 z=13
x=1660 y=343 z=13
x=1662 y=343 z=13
x=1663 y=341 z=13
x=1664 y=341 z=13


-- annihilator lever

function onUse(cid, item, frompos, item2, topos)

if item.uid == 7000 and item.itemid == 1945 then
player1pos = {x=1658, y=351, z=13, stackpos=253}
player1 = getThingfromPos(player1pos)

player2pos = {x=1659, y=351, z=13, stackpos=253}
player2 = getThingfromPos(player2pos)

player3pos = {x=1660, y=351, z=13, stackpos=253}
player3 = getThingfromPos(player3pos)

player4pos = {x=1661, y=351, z=13, stackpos=253}
player4 = getThingfromPos(player4pos)


if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
queststatus1 = getPlayerStorageValue(player1.uid,7000)
queststatus2 = getPlayerStorageValue(player2.uid,7000)
queststatus3 = getPlayerStorageValue(player3.uid,7000)
queststatus4 = getPlayerStorageValue(player4.uid,7000)

if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
nplayer1pos = {x=1659, y=341, z=13}
nplayer2pos = {x=1660, y=341, z=13}
nplayer3pos = {x=1661, y=341, z=13}
nplayer4pos = {x=1662, y=341, z=13}

doSendMagicEffect(player1pos,2)
doSendMagicEffect(player2pos,2)
doSendMagicEffect(player3pos,2)
doSendMagicEffect(player4pos,2)

doTeleportThing(player1.uid,nplayer1pos)
doTeleportThing(player2.uid,nplayer2pos)
doTeleportThing(player3.uid,nplayer3pos)
doTeleportThing(player4.uid,nplayer4pos)

doSendMagicEffect(nplayer1pos,10)
doSendMagicEffect(nplayer2pos,10)
doSendMagicEffect(nplayer3pos,10)
doSendMagicEffect(nplayer4pos,10)

doTransformItem(item.uid,item.itemid+1)
else
doPlayerSendCancel(cid,"Somebody in your team has already done this quest.")
end
else
doPlayerSendCancel(cid,"You need four players for this quest.")
end

elseif item.uid ==7000 and item.itemid == 1946 then
if getPlayerAccess(cid) > 0 then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
else
return 0
end

return 1
end
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

@Up:

Masz:

Kod:
-- annihilator lever

function onUse(cid, item, frompos, item2, topos)

if item.uid == 7000 and item.itemid == 1945 then
player1pos = {x=1658, y=351, z=13, stackpos=253}
player1 = getThingfromPos(player1pos)

player2pos = {x=1659, y=351, z=13, stackpos=253}
player2 = getThingfromPos(player2pos)

player3pos = {x=1660, y=351, z=13, stackpos=253}
player3 = getThingfromPos(player3pos)

player4pos = {x=1661, y=351, z=13, stackpos=253}
player4 = getThingfromPos(player4pos)


if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
queststatus1 = getPlayerStorageValue(player1.uid,7000)
queststatus2 = getPlayerStorageValue(player2.uid,7000)
queststatus3 = getPlayerStorageValue(player3.uid,7000)
queststatus4 = getPlayerStorageValue(player4.uid,7000)

if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
nplayer1pos = {x=1659, y=341, z=13}
nplayer2pos = {x=1660, y=341, z=13}
nplayer3pos = {x=1661, y=341, z=13}
nplayer4pos = {x=1662, y=341, z=13}

doSendMagicEffect(player1pos,2)
doSendMagicEffect(player2pos,2)
doSendMagicEffect(player3pos,2)
doSendMagicEffect(player4pos,2)

doTeleportThing(player1.uid,nplayer1pos)
doTeleportThing(player2.uid,nplayer2pos)
doTeleportThing(player3.uid,nplayer3pos)
doTeleportThing(player4.uid,nplayer4pos)

doSendMagicEffect(nplayer1pos,10)
doSendMagicEffect(nplayer2pos,10)
doSendMagicEffect(nplayer3pos,10)
doSendMagicEffect(nplayer4pos,10)

doCreateMonster("Demon", {x=1659 y=339 z=13})
doCreateMonster("Demon", {x=1661 y=339 z=13})
doCreateMonster("Demon", {x=1660 y=343 z=13})
doCreateMonster("Demon", {x=1662 y=343 z=13})
doCreateMonster("Demon", {x=1663 y=341 z=13})
doCreateMonster("Demon", {x=1664 y=341 z=13})

doTransformItem(item.uid,item.itemid+1)
else
doPlayerSendCancel(cid,"Somebody in your team has already done this quest.")
end
else
doPlayerSendCancel(cid,"You need four players for this quest.")
end

elseif item.uid ==7000 and item.itemid == 1946 then
if getPlayerAccess(cid) > 0 then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
else
return 0
end

return 1
end
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Ju? miesi?c czekam na ten skrypt bo?e ludzie zamknijcie ten temat bo tylko za?mieca forum
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

nic sie nie dzieje
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)


function onTargetTile(cid, pos)

if (NECRO_MAX_SKELETONS < getPlayerStorageValue(cid, STORAGE_SAVE)) then
doConvinceCreature(cid, doCreateMonster(cid, "Skeleton", pos))
setPlayerStorageValue(cid, STORAGE_SAVE, getPlayerStorageValue(cid, STORAGE_SAVE) + 1)
elseif getCreatureSummons(cid) == 4 then
SetPlayerStorageValue(cid, STORAGE_SAVE, 4)
elseif getCreatureSummons(cid) == 3 then
SetPlayerStorageValue(cid, STORAGE_SAVE, 3)
elseif getCreatureSummons(cid) == 2 then
SetPlayerStorageValue(cid, STORAGE_SAVE, 2)
elseif getCreatureSummons(cid) == 1 then
SetPlayerStorageValue(cid, STORAGE_SAVE, 1)
elseif getCreatureSummons(cid) < 1 then
SetPlayerStorageValue(cid, STORAGE_SAVE, -1)
elseif (NECRO_MAX_SKELETONS > getPlayerStorageValue(cid, STORAGE_SAVE)) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You cannot summon more creatures.")
end

end

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

masz gdzie? zdefiniowane NECRO_MAX_SKELETONS / STORAGE_SAVE? sprawd? podk?adaj?c czy dobrze wyjdzie "obliczenie"/dzia?anie skryptu

masz 20x post?w wi?cej to nie wiem co ty ?e? tu robi? te rok czasu

Podaj/Sprawd? co oznaczaj? i jakie maj? znaczenie w dzia?aniu skryptu te komendy co poda?em kumasz?
 
Ostatnia edycja:
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Wersja Tibii: 7.92
Silnik: Evolution
Nazwa Tibii: Nowots

Mam problem z transformami chce np: ?eby sasuke mia? 4 trans, naruto 3 trans, kiba 3 trans Itachi 2 trans, gaara 2 trans, neji 2 trans, hinata 2 trans, sakura 3 trans, shino 2 trans i rock lee 2 trans ale nie moge tego zrobi? ;/

skrypt transform:
function onSay(cid, words, param)
voc = getPlayerVocation(cid)


lee = { lookType = 59, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0 }
sasuke = { lookType = 66, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0 }
naruto = { lookType = 70, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0 }
gaara = { lookType = 5, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0 }

if words == "revert" then
pos2 = getPlayerPosition(cid)
if voc == 27 then -- Lee
pos = getPlayerPosition(cid)
doPlayerSetVocation(cid, 6)
doSetCreatureOutfit(cid, lee, -1)
doSendMagicEffect(pos2, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 30 then -- Sakura
doPlayerSetVocation(cid, 3)
doSendMagicEffect(pos2, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 25 then -- Sasuke
doPlayerSetVocation(cid, 2)
doSetCreatureOutfit(cid, sasuke, -1)
doSendMagicEffect(pos2, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 28 then -- Sasuke
doPlayerSetVocation(cid, 2)
doSetCreatureOutfit(cid, sasuke, -1)
doSendMagicEffect(pos2, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 31 then -- Itachi
doPlayerSetVocation(cid, 11)
doSendMagicEffect(pos2, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 34 then -- Kiba
doPlayerSetVocation(cid, 7)
doSendMagicEffect(pos2, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 24 then -- Naruto
doPlayerSetVocation(cid, 1)
doSetCreatureOutfit(cid, naruto, -1)
doSendMagicEffect(pos2, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 26 then -- Gaara
doPlayerSetVocation(cid, 9)
doSetCreatureOutfit(cid, gaara, -1)
doSendMagicEffect(pos2, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 29 then -- Haku
doPlayerSetVocation(cid, 5)
doSendMagicEffect(pos2, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 32 then -- Neji
doPlayerSetVocation(cid, 4)
doSendMagicEffect(pos2, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 33 then -- Hinata
doPlayerSetVocation(cid, 10)
doSendMagicEffect(pos2, 2)
doPlayerSay(cid,"revert",16)
end
end



local function transform(parameters)
voc = getPlayerVocation(cid)
lvl = getPlayerLevel(cid)
mana = getPlayerMana(cid)

lee2 = { lookType = 159, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0 }
sasuke1 = { lookType = 40, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0 }
sasuke2 = { lookType = 160, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0 }
naruto2 = { lookType = 29, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0 }
gaara2 = { lookType = 57, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0 }

if words == "transform" then
pos3 = getPlayerPosition(cid)
if voc == 6 then -- Open All Gates (Lee)
if lvl >= 70 then
if mana >= 600 then
doPlayerSetVocation(cid,27)
doSetCreatureOutfit(cid, lee2, 240000)
doPlayerAddMana(cid, -600)
doPlayerAddMana(cid, 6000)
doSendMagicEffect(pos3, 13)
doPlayerSay(cid,"transform",16)
else
doPlayerSendCancel(cid, "You don't have enough mana.")
doSendMagicEffect(pos3, 2)
end
else
doPlayerSendCancel(cid, "You don't have required level")
doSendMagicEffect(pos3, 2)
end
elseif voc == 3 then -- Sakura
if lvl >= 50 then
if mana >= 600 then
doPlayerSetVocation(cid,30)
doPlayerAddMana(cid, -500)
doSendMagicEffect(pos3, 13)
doPlayerSay(cid,"transform",16)
else
doPlayerSendCancel(cid, "You don't have enough mana.")
doSendMagicEffect(pos3, 2)
end
else
doPlayerSendCancel(cid, "You don't have required level")
doSendMagicEffect(pos3, 2)
end

elseif voc == 2 then -- Cursed Seal
if lvl >= 70 then
if mana >= 600 then
doPlayerSetVocation(cid,25)
doSetCreatureOutfit(cid, sasuke1, 240000)
doPlayerAddMana(cid, -500)
doSendMagicEffect(pos3, 13)
doPlayerSay(cid,"transform",16)
else
doPlayerSendCancel(cid, "You don't have enoug mana.")
doSendMagicEffect(pos3, 2)
end
else
doPlayerSendCancel(cid, "You don't have required level")
doSendMagicEffect(pos3, 2)
end

elseif voc == 25 then -- Cursed Seal Stage Two
if lvl >= 140 then
if mana >= 600 then
doPlayerSetVocation(cid,28)
doSetCreatureOutfit(cid, sasuke2, 240000)
doPlayerAddMana(cid, -1400)
doSendMagicEffect(pos3, 13)
doPlayerSay(cid,"transform",16)
else
doPlayerSendCancel(cid, "You don't have enoug mana.")
doSendMagicEffect(pos3, 2)
end
else
doPlayerSendCancel(cid, "You don't have required level")
doSendMagicEffect(pos3, 2)
end

elseif voc == 11 then -- Itachi
if lvl >= 60 then
if mana >= 600 then
doPlayerSetVocation(cid,31)
doPlayerAddMana(cid, -700)
doSendMagicEffect(pos3, 13)
doPlayerSay(cid,"transform",16)
else
doPlayerSendCancel(cid, "You don't have enoug mana.")
doSendMagicEffect(pos3, 2)
end
else
doPlayerSendCancel(cid, "You don't have required level")
doSendMagicEffect(pos3, 2)
end

elseif voc == 7 then -- Kiba
if lvl >= 50 then
if mana >= 600 then
doPlayerSetVocation(cid,34)
doPlayerAddMana(cid, -500)
doSendMagicEffect(pos3, 13)
doPlayerSay(cid,"transform",16)
else
doPlayerSendCancel(cid, "You don't have enoug mana.")
doSendMagicEffect(pos3, 2)
end
else
doPlayerSendCancel(cid, "You don't have required level")
doSendMagicEffect(pos3, 2)
end

elseif voc == 1 then -- Naruto
if lvl >= 70 then
if mana >= 600 then
doPlayerSetVocation(cid,24)
doSetCreatureOutfit(cid, naruto2, 240000)
doPlayerAddMana(cid, -600)
doSendMagicEffect(pos3, 13)
doPlayerSay(cid,"transform",16)
else
doPlayerSendCancel(cid, "You don't have enoug mana.")
doSendMagicEffect(pos3, 2)
end
else
doPlayerSendCancel(cid, "You don't have required level")
doSendMagicEffect(pos3, 2)
end

elseif voc == 9 then -- Gaara
if lvl >= 80 then
if mana >= 600 then
doPlayerSetVocation(cid,26)
doSetCreatureOutfit(cid, gaara2, 240000)
doPlayerAddMana(cid, -800)
doSendMagicEffect(pos3, 13)
doPlayerSay(cid,"transform",16)
else
doPlayerSendCancel(cid, "You don't have enoug mana.")
doSendMagicEffect(pos3, 2)
end
else
doPlayerSendCancel(cid, "You don't have required level")
doSendMagicEffect(pos3, 2)
end

elseif voc == 5 then -- Haku
if lvl >= 50 then
if mana >= 600 then
doPlayerSetVocation(cid,29)
doPlayerAddMana(cid, -400)
doSendMagicEffect(pos3, 13)
doPlayerSay(cid,"transform",16)
else
doPlayerSendCancel(cid, "You don't have enoug mana.")
doSendMagicEffect(pos3, 2)
end
else
doPlayerSendCancel(cid, "You don't have required level")
doSendMagicEffect(pos3, 2)
end

elseif voc == 4 then -- Neji
if lvl >= 60 then
if mana >= 600 then
doPlayerSetVocation(cid,32)
doPlayerAddMana(cid, -500)
doSendMagicEffect(pos3, 13)
doPlayerSay(cid,"transform",16)
else
doPlayerSendCancel(cid, "You don't have enoug mana.")
doSendMagicEffect(pos3, 2)
end
else
doPlayerSendCancel(cid, "You don't have required level")
doSendMagicEffect(pos3, 2)
end

elseif voc == 10 then -- Hinata
if lvl >= 60 then
if mana >= 600 then
doPlayerSetVocation(cid,33)
doPlayerAddMana(cid, -500)
doSendMagicEffect(pos3, 13)
doPlayerSay(cid,"transform",16)
else
doPlayerSendCancel(cid, "You don't have enoug mana.")
doSendMagicEffect(pos3, 2)
end
else
doPlayerSendCancel(cid, "You don't have required level")
doSendMagicEffect(pos3, 2)
end
end
end
end

local function revert(parameters)
voc = getPlayerVocation(cid)
lvl = getPlayerLevel(cid)
mana = getPlayerMana(cid)
pos = getPlayerPosition(cid)

lee = { lookType = 59, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0 }
sasuke = { lookType = 66, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0 }
naruto = { lookType = 70, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0 }
gaara = { lookType = 5, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0 }

if voc == 27 then -- Lee
pos = getPlayerPosition(cid)
doPlayerSetVocation(cid, 6)
doSetCreatureOutfit(cid, lee, -1)
doSendMagicEffect(pos, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 30 then -- Sakura
doPlayerSetVocation(cid, 3)
doSendMagicEffect(pos, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 25 then -- Sasuke
doPlayerSetVocation(cid, 2)
doSetCreatureOutfit(cid, sasuke, -1)
doSendMagicEffect(pos, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 28 then -- Sasuke
doPlayerSetVocation(cid, 2)
doSetCreatureOutfit(cid, sasuke, -1)
doSendMagicEffect(pos, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 31 then -- Itachi
doPlayerSetVocation(cid, 11)
doSendMagicEffect(pos, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 34 then -- Kiba
doPlayerSetVocation(cid, 7)
doSendMagicEffect(pos, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 24 then -- Naruto
doPlayerSetVocation(cid, 1)
doSetCreatureOutfit(cid, naruto, -1)
doSendMagicEffect(pos, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 26 then -- Gaara
doPlayerSetVocation(cid, 9)
doSetCreatureOutfit(cid, gaara, -1)
doSendMagicEffect(pos, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 29 then -- Haku
doPlayerSetVocation(cid, 5)
doSendMagicEffect(pos, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 32 then -- Neji
doPlayerSetVocation(cid, 4)
doSendMagicEffect(pos, 2)
doPlayerSay(cid,"revert",16)

elseif voc == 33 then -- Hinata
doPlayerSetVocation(cid, 10)
doSendMagicEffect(pos, 2)
doPlayerSay(cid,"revert",16)

end
end

addEvent(transform,0,parameters)
addEvent(revert,240000,parameters)
end


Prosze o pomoc. Z g?ry thx :D
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Wersja tibii : 8.5
Silnik : TFS 0.3.5PL1
Tre?? b??du / opis b??du : Zamiast p?ywa? - gracz chodzi po wodzie :(
Skrypt : od 2 dni szukam po r??nych forach skryptu, i ka?dy swim.lua i swimming.lua w movements dzia?a tak samo.. - gracz nie p?ywa, lecz chodzi po wodzie
Ewentualne uwagi : Je?eli si? relogne w wodzie, to bd mia? outfit nurka, aby zn?w miec normalny, musz? si? relogn?? na l?dzie.. Z g?ry thx za pomoc.
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Czy ktos mi wkoncu posle naprawiony skrypt? :|
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Po wykonaniu demon oak quest idzie si? do oldraka i m?wi o powodzeniu misji. Kiedy si? kliknie na gravestone, nie przenosi ono w wyznaczone miejsce (po prostu brak efektu).

Oto skrypt gravestone:
PHP:
function onUse(cid, item, frompos, item2, topos)
 



if item.uid == 29005 then

	player1pos = {x=668, y=1170, z=8, stackpos=1}
	player1 = getThingfromPos(player1pos)
			
			doTeleportThing(player1.uid,ntp1pos)
			doSendMagicEffect(ntp1pos,CONST_ME_HITBYFIRE)
			doSetItemOutfit(cid, 2317, 10000)
			doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -600, -700, CONST_ME_FIRE)
			doCreatureSay(cid, "You have entered the secret cave! Rumours says a key is hidden here to protect the greatest power on the lands of Roxor against the evil mage!", TALKTYPE_ORANGE_1)
 
		end
end

I na wszelki wypadek npc:

PHP:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
function onCreatureAppear(cid)              npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid)           npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg)  npcHandler:onCreatureSay(cid, type, msg) end
function onThink()                      npcHandler:onThink() end
-- OTServ event handling functions end

local hallowedAxePrice = 2000 -- Price of the hallowed axe.

function creatureSayCallback(cid, type, msg)
    -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
    if (not npcHandler:isFocused(cid)) then
        return false
    end

        if msgcontains(msg, 'hallowed axe') then
            if getPlayerStorageValue(cid,29061) == 1 then
                npcHandler:say('Do you want to buy a Hallowed Axe from me?', cid)
                talk_state = 1
            end
        elseif msgcontains(msg, 'yes') and talk_state == 1 then
            if getPlayerItemCount(cid,2386) >= 1 and getPlayerMoney(cid) >= hallowedAxePrice then
                if doPlayerRemoveMoney(cid, hallowedAxePrice) == true then
                    npcHandler:say('Here you are. You can now defeat the demon oak with this axe.', cid)
                    doPlayerRemoveItem(cid, 2386, 1)
                    doPlayerAddItem(cid, 8293, 1)
                    talk_state = 0
                end
            else
                npcHandler:say('I need an axe and '.. hallowedAxePrice ..' gold coins to make you an {hallowed axe}.', cid)
                talk_state = 0
            end
        elseif msgcontains(msg, 'demon oak') then
            if getPlayerStorageValue(cid,29061) == 1 then
                npcHandler:say('Did you defeat the demon oak?', cid)
                talk_state = 2
            end
        elseif msgcontains(msg, 'yes') and talk_state == 2 then
            if getPlayerStorageValue(cid,21545) == 2 then
                npcHandler:say('Good job!', cid)
                setPlayerStorageValue(cid,21545,3)
                talk_state = 0
            else
                npcHandler:say('Go defeat the demon oak first.', cid)
                talk_state = 0
            end
------------------------------------------------ confirm no ------------------------------------------------
        elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 3) then
            npcHandler:say('Ok thanks.', cid)
            talk_state = 0
        end
    -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
    return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Prosz? o pomoc.
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Help!!!!!! Chcia?bym zrobi? manarunki tylko dla sorcrera i druida.... mial by ktos jakis skrypt?Help!! .. Mam Silnik 8.40 YourOts... I w Spells.xml.. wpisalem Od jakiego mlvl i lvl.. ale to nie dziala.. bo jak by to chocia? dzialalo... to bym wpisal tylko 60 m lvl i by Pall i Kin nie uzywal tej manarunki.... Prosz? o szybk? Odpowiedz...

Pom??cie Prosz?....
 
Ostatnia edycja:
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

M?j best friend pr?bowa? zrobi? skrypt, ?e gdy gracz ma dane ID w backpacku (w tym wypadku: 1970) to gdy gracz stanie na danej kratce, to go przeteleportuje na dane pozycje. Lecz skrypt nie dzia?a, b??du nie ma. Mo?e ma kto? jaki? pomys? co mo?e by? ?le?
Oto skrypt:
Kod:
function onStepIn(cid, item, position, fromPosition)
	if(getPlayerItemCount(cid, 1970) >= 1) then
		doTeleportThing(cid, {x=1281, y=1248, z=12})
	else
		doTeleportThing(cid, fromPosition)
		doPlayerSendTextMessage(cid, 4, "Sorry, you don't have a Special Book.")
	return true
end

Prosz? o pomoc, w zamian dam Rep+.
Dzi?ki, Pozdrawiam GarQet.
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

poprosze o skrypt na BanKai czyli Mozna powiedziec Transform pod 8.5 SQL forgetten server plzzz ;P
 
Odp: [7.92+] Firma poprawiaj?ca skrypty by Ovner & Gelio

Wersja tibii : 8.5
Silnik : TFS 0.3.4
Tre?? ___
Skrypt : [.CODE] NPC ktory sprzedaje GM [./CODE]
Ewentualne uwagi : niech npc sprzedaje Gma za 100cc
 
Status
Zamknięty.
Do góry