What's new

przerobienie skryptu pomoc

Status
Not open for further replies.

Elvascoo

Active User
Joined
Nov 2, 2010
Messages
59
Reaction score
0
witam mam problem otoz posiadam skrypt ktory doda level na naci?ni?ciu na statue kt?ra ma dane uid lecz nie dzia?a.
function onUse(cid, item, fromPosition, itemEx, toPosition)
doPlayerAddExperience(cid, getPlayerExperience(cid)-(getPlayerLevel(cid)+1))
return true
end
moze mi ktos go przerobic aby dzialal i aby mozna bylo dostac lvl tylko raz??
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: przerobienie skryptu pomoc

Sam musisz sobie to zrobi?.
Najpierw sprawd? funkcj? getPlayerStorageValue czy gracz ma dan? warto?? storage, potem, je?li warunek jest spe?niony, nadaje mu inn? warto?? ?w storage.
Dodaj linijk? do actions.

#down
Pomog?em, nawet nie wiesz jak bardzo.
Skoro nie potrafisz napisa? takiego prostego skryptu to nie zabieraj si? nawet za stawianie OTSa.
 
Last edited:

Elvascoo

Active User
Joined
Nov 2, 2010
Messages
59
Reaction score
0
Odp: przerobienie skryptu pomoc

zacznijmy od tego ze ten skrypt mi wcale nie dziala.
@oskar wcale mi nie pomogles nie znam sie na skryptach wiec tego nie zrobie to za trudne dla mnie.
 

Unass

Active User
Joined
Jul 21, 2010
Messages
123
Reaction score
22
Odp: przerobienie skryptu pomoc

function onUse(cid, item)
if getPlayerStorageValue(cid, 1932) ~= 2 then
doPlayerAddLevel(cid, 1)
setPlayerStorageValue(cid, 1932, 2)
doCreatureSay(cid, "LVL UP", TALKTYPE_ORANGE_1)
else
doCreatureSay(cid, "Odebralem juz nagrode.", TALKTYPE_ORANGE_1)
end
return true
end

nie zapomnij zarejestrowac w actions.xml
 
Status
Not open for further replies.
Top