What's new

Skrypty & Kody Jak to zrobic?

Status
Not open for further replies.

vegetroex

Active User
Joined
Dec 14, 2012
Messages
78
Reaction score
2
Ok chce zrobic questa na nowe przemiany mam juz skrpty itd tylko teraz jak zrobic ze po kliknienciu na skrzynie on dostanie ta nowa przemiane ;d

czyli praktycznie jak dodac unique id do tej przemiany i actionid zeby dzialalo questa itd juz mam ;]

Za POMOC REPUT
 

Logit3ch

Advanced User
Joined
Oct 2, 2013
Messages
165
Reaction score
6
Odp: Jak to zrobic?

Nie rozumiem... Przemiane w co? :O
Na mapce klikasz na wybran? skrzynk? prawym " properties " i tam ustawisz UID. ustaw takie ?eby nie powtarza?o si? i potem w XML je deklarujesz.
 

vegetroex

Active User
Joined
Dec 14, 2012
Messages
78
Reaction score
2
Odp: Jak to zrobic?

to jest ots dragon ball i jest np lpq i ja chce zrobic nowa przemiane o nazwie gpq
 

Ciamciaj Bigos

ก้้้้้้&
Joined
Jun 6, 2013
Messages
2,081
Reaction score
192
Odp: Jak to zrobic?

ten trans ma byc staly czy na pewien okres czasu? byloby milo gdybys dal tez skrypt od lpq, lekko bym przerobil i zaoszczedzil czasu mi i tobie xd
 

vegetroex

Active User
Joined
Dec 14, 2012
Messages
78
Reaction score
2
Odp: Jak to zrobic?

ok juz ci daje ten trans ma byc staly ;]

hmm sa dwa inne bo na lpq(czarna przemiane) jest to

Code:
local newpos9 = {x = 2432,y = 2350,z = 8}
	function onUse(cid, item, frompos, item2, topos)

	    if item.uid == 50047 then
	      queststatus = getPlayerStorageValue(cid,50047)
	        if queststatus == -1 then	   
		     doPlayerSendTextMessage(cid,22,'You have learned legendary strong!.')
			doTeleportThing(cid, newpos9)
	        setPlayerStorageValue(cid,9997,1)  
	        else
	        doPlayerSendTextMessage(cid,22,"It is empty.")
end
end
   	return 1
   end


a na spq (czerwona przemiane jest takie cos)

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

if item.uid == 50049 and item.itemid == 1945 then
player1pos = {x=2459, y=2518, z=8, stackpos=253}
player1 = getThingfromPos(player1pos)

player2pos = {x=2460, y=2518, z=8, stackpos=253}
player2 = getThingfromPos(player2pos)

player3pos = {x=2461, y=2518, z=8, stackpos=253}
player3 = getThingfromPos(player3pos)



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


if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 then
nplayer1pos = {x=2527, y=2566, z=8}
nplayer2pos = {x=2528, y=2566, z=8}
nplayer3pos = {x=2529, y=2566, z=8}



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


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



doSendMagicEffect(nplayer1pos,100)
doSendMagicEffect(nplayer2pos,100)
doSendMagicEffect(nplayer3pos,100)


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

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

return 1
end
 
Last edited by a moderator:

Ciamciaj Bigos

ก้้้้้้&
Joined
Jun 6, 2013
Messages
2,081
Reaction score
192
Odp: Jak to zrobic?

nie do konca o to mi chodzilo bo to co tutaj dales odpowiada za przenoszenie do pokoju z questem i otwieranie skrzynki xd
ale masz tutaj cos banalnego
[lua]function onUse(cid, item)
local storage = 5454545
if getPlayerStorageValue(cid, storage) == -1 then
if getPlayerVocation(cid) == 3 then --tutaj zamiast 3 wpisz numer profesji z vocations.xml transa ktory ma byc wymagany do klikniecia skrzynki (i noszony w czasie questu)
doPlayerSetVocation(cid, 5) --zamiast 5 zmien na nowy vocation ktory zrobiles
local outfit = {lookType = 40, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0} --zmien liczbe 40 na nowy wyglad postaci
setPlayerStorageValue(cid, storage, 1)
doSetCreatureOutfit(cid, outfit, -1)


elseif getPlayerVocation(cid) == 6 then --tutaj zamiast 6 wpisz numer profesji z vocations.xml transa ktory ma byc wymagany do klikniecia skrzynki (i noszony w czasie questu)
doPlayerSetVocation(cid, 7) --zamiast 7 zmien na nowy vocation ktory zrobiles
local outfit = {lookType = 40, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0} --zmien liczbe 40 na nowy wyglad postaci
setPlayerStorageValue(cid, storage, 1)
doSetCreatureOutfit(cid, outfit, -1)


end
else
doPlayerSendCancel(cid, "Wykonales ten quest!")
end
return true
end[/lua]
prostszego sie zrobic nie da, a edycja tego jest latwa. w razie dodawania nowych postaci ktore moga robic ten quest kopiujesz tylko od elseif do doSetCreatureOutfit(cid, outfit, -1) i wklejasz przed end
 
Last edited:

vegetroex

Active User
Joined
Dec 14, 2012
Messages
78
Reaction score
2
Odp: Jak to zrobic?

Zajebiscie leci reput ;]

-----------------------------------------------------------------------------------------------------

Mozna Zamknac
 
Status
Not open for further replies.
Top