Transform xD

Status
Zamknięty.

Warcho

User
Zarejestrowany
Dołączył
Listopad 10, 2010
Posty
47
Liczba reakcji
1
elo mam skrypt na transform ale co mam zrobic zeby z tym transem dochodzilo 10 k hp i many ??
Kod:
function onSay(cid, words, param)

goku = {lookType=31}

if getPlayerVocation(cid) == 1 then	
    if getPlayerLevel(cid) >= 30 then
      doPlayerSetVocation(cid,2)
          doPlayerAddHealthMax(cid, 10000)
          doPlayerAddManaMax(cid, 10000)
         doCreatureChangeOutfit(cid, goku)
		doSendMagicEffect(getPlayerPosition(cid), 8) 	
else
doPlayerSendCancel(cid, "Goku! You need 30 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

--- End ---

else

doPlayerSendCancel(cid, "Sorry.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 

end


end
 
Odp: Transform xD

zmien:
PHP:
          doPlayerAddHealthMax(cid, 10000)
          doPlayerAddManaMax(cid, 10000)
na
PHP:
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+10000)
			setCreatureMaxMana(cid, getCreatureMaxMana(cid)+10000)
 
Odp: Transform xD

dodalem to ale skrypt dziala tak samo daje transa ale nie dodaje hp i many ;/
 
Odp: Transform xD

podaj dok?adna wersje silnika bo nie wiem jakich funkcji uzyc ;s
 
Odp: Transform xD

Pod jak? tibie ten silnik ?
8.0, czy jakas inna?
 
Odp: Transform xD

Prosze powinno dzialac:
function onSay(cid, words, param)
goku = {lookType=31}
if getPlayerVocation(cid) == 1 then
if getPlayerLevel(cid) >= 30 then
doPlayerSetVocation(cid,2)
doPlayerAddHealth(cid, 10000)
doPlayerAddMana(cid, 10000)
doCreatureChangeOutfit(cid, goku)
doSendMagicEffect(getPlayerPosition(cid), 8)
else
doPlayerSendCancel(cid, "Goku! You need 30 level to transform.")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
--- End ---
else
doPlayerSendCancel(cid, "Sorry.")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
end
 
Odp: Transform xD

@Yoti: zanim zaczniesz pisac pomysl to co dales ulecza gracza o 10k hp a nie dodaje mu hp -.-

@Topic: masz silnik sql? xml? jaki dokladnie bo jesli sql top w zapytaniu mozna zrobic ;s
 
Odp: Transform xD

~refresh
sr dziala ale nie tak jak powinno ;D dodaje mane ale dopiero po relogu xD co zrobic zeby odrazu dawalo
 
Odp: Transform xD

@Up
Zawsze mo?esz zrobi? ?eby dodawa?o w czasie u?ycia po 1 punkcie many i hp i powinno od razu wida? ze doda?o max many i hp;d
Przyk?ad:

PHP:
cfg ={
mana = 10000,
health = 10000
}
function onSay(cid, words, param)
goku = {lookType=31}
if getPlayerVocation(cid) == 1 then    
    if getPlayerLevel(cid) >= 30 then
      doPlayerSetVocation(cid,2)
		setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+cfg.health)
		setCreatureMaxMana(cid, getCreatureMaxMana(cid)+cfg.mana)  
	doCreatureAddHealth(cid, 1)
	doCreatureAddMana(cid, 1)
        doCreatureChangeOutfit(cid, goku)
        doSendMagicEffect(getPlayerPosition(cid), 8)     
else
doPlayerSendCancel(cid, "Goku! You need 30 level to transform.")
        doSendMagicEffect(getPlayerPosition(cid), 2) 
end
--- End ---
else
doPlayerSendCancel(cid, "Sorry.")
        doSendMagicEffect(getPlayerPosition(cid), 2) 
end
end

//Edit

Spr?buj teraz, doda?em funkcj? z TFS 0.3.4, ale na Twoim 0.3.6 te? powinno chodzi?.
 
Ostatnia edycja:
Odp: Transform xD

[27/02/2011 19:44:25] data/talkactions/scripts/kaioken.lua:12: attempt to call global 'doPlayerAddHealth' (a nil value)
[27/02/2011 19:44:25] stack traceback:
[27/02/2011 19:44:25] data/talkactions/scripts/kaioken.lua:12: in function <data/talkactions/scripts/kaioken.lua:5>

taki blad w silniku wyskakuje ;d
 
Status
Zamknięty.
Back
Do góry