What's new

Skrypty & Kody Po??czenie skryptu actions.

Status
Not open for further replies.

mati1389

Active User
Joined
May 9, 2010
Messages
64
Reaction score
2
Witam. Czy m?g?by mi kto? po??czy? te 2 skrypty ? bo niestety nie mo?na ,,pod??czy?" 2 skrypt?w actions do 1 itemu. S? one odpowiedzialne (1) za teleportacje do temple, a (2) za zmian? outfitu. Tibia 7.92. Oto skrypty :

Code:
function onUse(cid, item, frompos, item2, topos)
local storageValue = 12198
vipstatus = getPlayerStorageValue(cid,storageValue)
newnPosition = {x=502, y=358, z=7} -- pozycja temple VIP-a!
if vipstatus == 1 then
playerpos = getPlayerPosition(cid)
doorpos = {x = frompos.x, y = frompos.y, z = frompos.z, stackpos = 253}
if item.itemid == 5468 and
getPlayerStorageValue(cid,12198) == 1 then
doTeleportThing(cid,newnPosition)
doSendMagicEffect(newnPosition, 12)
setPlayerStorageValue(cid,12198,1)
doPlayerSay(cid, "Teleportowales sie do temple konoha.", TALKTYPE_ORANGE_1)
end
end
return 1
end

i

Code:
function onUse(cid, item, frompos, item2, topos)
local storage = 1800
setPlayerStorageValue(cid, storage+1, getCreatureOutfit(cid).lookHead)
setPlayerStorageValue(cid, storage+2, getCreatureOutfit(cid).lookBody)
setPlayerStorageValue(cid, storage+3, getCreatureOutfit(cid).lookLegs)
setPlayerStorageValue(cid, storage+4, getCreatureOutfit(cid).lookFeet)
standardoutfit = { lookType = 74, lookHead = getPlayerStorageValue(cid, storage+1), lookBody = getPlayerStorageValue(cid, storage+2), lookLegs = getPlayerStorageValue(cid, storage+3), lookFeet = getPlayerStorageValue(cid, storage+4), lookAddons = getPlayerStorageValue(cid, storage+5) }
doSetCreatureOutfit(cid, standardoutfit, 10*60*1000)
local pos = getPlayerPosition(cid)
doSendMagicEffect(pos, 20)
end

Z g?ry dzi?kuj?.


Notka moderatorska:
Dodane code.
Don Dawido.
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: Po??czenie skryptu actions.

Nie bardzo wiem o co Ci dok?adnie chodzi. Dop?ki tego nie wyja?nisz to wiele zrobi? nie mog?.
 

mati1389

Active User
Joined
May 9, 2010
Messages
64
Reaction score
2
Odp: Po??czenie skryptu actions.

Chodzi mi o to, ?eby m?j item teleportowa? do temple i jednocze?nie zmienia? outfit.
A jak dodam obydwie ?cie?ki do actions.xml to tylko jedna dzia?a ;(
 

Shires29

User
Joined
Apr 11, 2012
Messages
31
Reaction score
0
Odp: Po??czenie skryptu actions.

Code:
function onUse(cid, item, frompos, item2, topos)
local standardoutfit = { lookType = 74, lookHead = getPlayerStorageValue(cid, storage+1), lookBody = getPlayerStorageValue(cid, storage+2), lookLegs = getPlayerStorageValue(cid, storage+3), lookFeet = getPlayerStorageValue(cid, storage+4), lookAddons = getPlayerStorageValue(cid, storage+5) }
local storageValue = 12198
local storage = 1800
vipstatus = getPlayerStorageValue(cid,storageValue)
newnPosition = {x=502, y=358, z=7} -- pozycja temple VIP-a!
if vipstatus == 1 then
playerpos = getPlayerPosition(cid)
doorpos = {x = frompos.x, y = frompos.y, z = frompos.z, stackpos = 253}
if item.itemid == 5468 and
getPlayerStorageValue(cid,12198) == 1 then
doTeleportThing(cid,newnPosition)
doSendMagicEffect(newnPosition, 12)
doSetCreatureOutfit(cid, standardoutfit, 10*60*1000)
setPlayerStorageValue(cid,12198,1)
setPlayerStorageValue(cid, storage+1, getCreatureOutfit(cid).lookHead)
setPlayerStorageValue(cid, storage+2, getCreatureOutfit(cid).lookBody)
setPlayerStorageValue(cid, storage+3, getCreatureOutfit(cid).lookLegs)
setPlayerStorageValue(cid, storage+4, getCreatureOutfit(cid).lookFeet)
doPlayerSay(cid, "Teleportowales sie do temple konoha.", TALKTYPE_ORANGE_1)
end
end
return 1
end

Powinno dzia?a?. :)
 

mati1389

Active User
Joined
May 9, 2010
Messages
64
Reaction score
2
Odp: Po??czenie skryptu actions.

Niestety nie dzia?a ;[ Teraz nic nie mog? zrobi?. (nie mog? u?y? przedmiotu)
 
Last edited:

DanJ93

ElfBot Helper
Joined
Jan 18, 2009
Messages
2,631
Reaction score
200
Odp: Po??czenie skryptu actions.

Ci chodzi ?e ma teleportowa? i zmienia? outfit?
Czy jak?
Bo z tego co zrozumia?em, to Ty chcesz aby raz zmienia? outfit, a raz przenosi? do temple, ale kiedy co ma robi??
 

mati1389

Active User
Joined
May 9, 2010
Messages
64
Reaction score
2
Odp: Po??czenie skryptu actions.

Chodzi mi o to, aby jednocze?nie zmienia? outfit i teleportowa? do temple.
 

DanJ93

ElfBot Helper
Joined
Jan 18, 2009
Messages
2,631
Reaction score
200
Odp: Po??czenie skryptu actions.

PHP:
function onUse(cid, item, frompos, item2, topos)
local storageValue = 12198
local storage = 1800
local pos = getPlayerPosition(cid)
vipstatus = getPlayerStorageValue(cid,storageValue)
newnPosition = {x=502, y=358, z=7} -- pozycja temple VIP-a!
if vipstatus == 1 then
	playerpos = getPlayerPosition(cid)
	doorpos = {x = frompos.x, y = frompos.y, z = frompos.z, stackpos = 253}
		if item.itemid == 5468 and getPlayerStorageValue(cid,12198) == 1 then
			doTeleportThing(cid,newnPosition)
			setPlayerStorageValue(cid, storage+1, getCreatureOutfit(cid).lookHead)
			setPlayerStorageValue(cid, storage+2, getCreatureOutfit(cid).lookBody)
			setPlayerStorageValue(cid, storage+3, getCreatureOutfit(cid).lookLegs)
			setPlayerStorageValue(cid, storage+4, getCreatureOutfit(cid).lookFeet)
			standardoutfit = { lookType = 74, lookHead = getPlayerStorageValue(cid, storage+1), lookBody = getPlayerStorageValue(cid, storage+2), lookLegs = getPlayerStorageValue(cid, storage+3), lookFeet = getPlayerStorageValue(cid, storage+4), lookAddons = getPlayerStorageValue(cid, storage+5) }
			doSetCreatureOutfit(cid, standardoutfit, 10*60*1000)
			doSendMagicEffect(newnPosition, 12)
			doSendMagicEffect(pos, 20)
			setPlayerStorageValue(cid,12198,1)
			doPlayerSay(cid, "Teleportowales sie do temple konoha.", TALKTYPE_ORANGE_1)
		end
end
return 1
end
Nie testowa?em


Notka moderatorska:
+1 OT Expert.
Don Dawido.
 
Last edited by a moderator:

mati1389

Active User
Joined
May 9, 2010
Messages
64
Reaction score
2
Odp: Po??czenie skryptu actions.

Dzi?ki wielkie, dzia?a :)
 
Status
Not open for further replies.
Top