Skrypty & Kody function onLogin(cid) problem

Status
Zamknięty.

Livey

New User
Zarejestrowany
Dołączył
Kwiecień 24, 2013
Posty
7
Liczba reakcji
0
Witam, mam problem z skrybtem na odejmowanie many i hp po wylogowaniu, ot?? gry chce si? zalogowa? na posta?, automatycznie mnie wylogowywuje, w sumie nawet nie widz?, ze zalogowalem na posta?, ale ocieniam to ze tak si? dzieje po wiadomo?ci w konsoli.
[28/06/2013 13:58:06] Tranks has logged in.
[28/06/2013 13:58:07] Tranks has logged out.

Wiec skrybt wyglada nastepujaco
PHP:
function onLogin(cid)

if getPlayerVocation(cid) == 2 then
setCreaturerMaxMana(cid, getCreatureMaxMana(cid) -1000)
setCreaturerMaxHealth(cid, getCreatureMaxHealth(cid) -1000)
elseif getPlayerVocation(cid) == 3 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-3000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-3000)
elseif getPlayerVocation(cid) == 4 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-6000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-6000)
elseif getPlayerVocation(cid) == 5 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-10000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-10000)
elseif getPlayerVocation(cid) == 6 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-14000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-14000)
elseif getPlayerVocation(cid) == 8 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 9 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-3000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-3000)
elseif getPlayerVocation(cid) == 10 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-6000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-6000)
elseif getPlayerVocation(cid) == 11 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-10000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-10000)
elseif getPlayerVocation(cid) == 12 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-14000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-14000)
elseif getPlayerVocation(cid) == 14 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 15 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-3000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-3000)
elseif getPlayerVocation(cid) == 16 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-6000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-6000)
elseif getPlayerVocation(cid) == 17 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-10000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-10000)
elseif getPlayerVocation(cid) == 18 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-14000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-14000)
elseif getPlayerVocation(cid) == 20 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 21 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-3000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-3000)
elseif getPlayerVocation(cid) == 22 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-6000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-6000)
elseif getPlayerVocation(cid) == 23 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-10000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-10000)
elseif getPlayerVocation(cid) == 24 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-14000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-14000)
elseif getPlayerVocation(cid) == 26 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 27 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-3000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-3000)
elseif getPlayerVocation(cid) == 28 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-6000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-6000)
elseif getPlayerVocation(cid) == 29 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-10000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-10000)
elseif getPlayerVocation(cid) == 30 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-14000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-14000)
elseif getPlayerVocation(cid) == 32 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 33 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-3000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-3000)
elseif getPlayerVocation(cid) == 34 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-6000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-6000)
elseif getPlayerVocation(cid) == 35 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-10000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-10000)
elseif getPlayerVocation(cid) == 36 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-14000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-14000)
elseif getPlayerVocation(cid) == 38 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 39 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-3000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-3000)
elseif getPlayerVocation(cid) == 40 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-6000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-6000)
elseif getPlayerVocation(cid) == 41 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-10000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-10000)
elseif getPlayerVocation(cid) == 42 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-14000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-14000)
elseif getPlayerVocation(cid) == 44 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 45 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-3000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-3000)
elseif getPlayerVocation(cid) == 46 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-6000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-6000)
elseif getPlayerVocation(cid) == 47 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-10000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-10000)
elseif getPlayerVocation(cid) == 48 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-14000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-14000)
elseif getPlayerVocation(cid) == 58 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 59 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-3000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-3000)
elseif getPlayerVocation(cid) == 60 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-6000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-6000)
elseif getPlayerVocation(cid) == 61 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-10000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-10000)
elseif getPlayerVocation(cid) == 62 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-14000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-14000)
elseif getPlayerVocation(cid) == 69 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 70 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-3000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-3000)
elseif getPlayerVocation(cid) == 71 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-6000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-6000)
elseif getPlayerVocation(cid) == 72 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-10000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-10000)
elseif getPlayerVocation(cid) == 73 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-14000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-14000)
elseif getPlayerVocation(cid) == 76 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 77 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-3000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-3000)
elseif getPlayerVocation(cid) == 78 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-6000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-6000)
elseif getPlayerVocation(cid) == 79 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-10000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-10000)
elseif getPlayerVocation(cid) == 80 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-14000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-14000)
elseif getPlayerVocation(cid) == 83 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 84 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 85 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 88 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 89 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 90 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 93 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 94 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 95 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 98 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 99 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 100 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 103 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 104 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 105 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 108 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 109 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 110 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 113 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 114 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 115 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 118 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 119 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 120 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 123 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 124 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 125 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 128 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 129 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 130 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 133 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 134 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 135 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 166 then
setCreaturerMaxMana(cid, getCreatureMaxMana(cid) -1000)
setCreaturerMaxHealth(cid, getCreatureMaxHealth(cid) -1000)
elseif getPlayerVocation(cid) == 167 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-3000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-3000)
elseif getPlayerVocation(cid) == 168 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-6000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-6000)
elseif getPlayerVocation(cid) == 169 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-10000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-10000)
elseif getPlayerVocation(cid) == 170 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-14000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-14000)
elseif getPlayerVocation(cid) == 173 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 174 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 175 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 178 then
setCreaturerMaxMana(cid, getCreatureMaxMana(cid) -1000)
setCreaturerMaxHealth(cid, getCreatureMaxHealth(cid) -1000)
elseif getPlayerVocation(cid) == 179 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-3000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-3000)
elseif getPlayerVocation(cid) == 180 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-6000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-6000)
elseif getPlayerVocation(cid) == 181 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-10000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-10000)
elseif getPlayerVocation(cid) == 182 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-14000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-14000)
elseif getPlayerVocation(cid) == 187 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 188 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 189 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 188 then
setCreaturerMaxMana(cid, getCreatureMaxMana(cid) -1000)
setCreaturerMaxHealth(cid, getCreatureMaxHealth(cid) -1000)
elseif getPlayerVocation(cid) == 189 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-3000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-3000)
elseif getPlayerVocation(cid) == 190 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-6000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-6000)
elseif getPlayerVocation(cid) == 191 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-10000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-10000)
elseif getPlayerVocation(cid) == 192 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-14000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-14000)
elseif getPlayerVocation(cid) == 193 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 194 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 195 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 208 then
setCreaturerMaxMana(cid, getCreatureMaxMana(cid) -1000)
setCreaturerMaxHealth(cid, getCreatureMaxHealth(cid) -1000)
elseif getPlayerVocation(cid) == 209 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-3000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-3000)
elseif getPlayerVocation(cid) == 210 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-6000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-6000)
elseif getPlayerVocation(cid) == 211 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-10000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-10000)
elseif getPlayerVocation(cid) == 212 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-14000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-14000)
elseif getPlayerVocation(cid) == 214 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 216 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 216 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
     return true
end
end



W login.lua i creaturescripts.xml doda?em all jak nale?y, wiec problem jest w skrybcie.


Prosz? o szybk? odpowied?.

Notka moderatorska:
U?ywaj znacznik?w
 
Odp: function onLogin(cid) problem

spr?buj zmieni? ka?dy elseif na if
i chyba nie mo?e by?
PHP:
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-10000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-10000)
dlatego ?e on ci zmieni max hp na -10000 a tak nie mo?e by? i mo?e wystepowac debug ja si? na skryptach nie znam ale na m?j rozum tak by? nie mo?e
nie wiem czy taka funkcja istnieje ale spr?buj tak
PHP:
doCreatureRemoveHealth(cid, getCreatureMaxHealth(cid)10000)

jak napisa?em ?le prosze mnie poprawi? :)
 
Ostatnia edycja:
Odp: function onLogin(cid) problem

#Topic, co dodales w creaturescripts dokladnie?

@UP: Kurwa jeblem jeblem jeblem, leze i nie moge wstac, jezeli nawet podstaw lua / funkcji nie znasz to nie pisz postow... takiego zerowca bez podstawowej umiejetnosci dedukcji jeszcze nie widzialem, a takich debilizmow co naczytalem sie w powyzszym poscie pewnie jeszcze dlugi czas nie spotkam...
 
Odp: function onLogin(cid) problem

Bardziej zasobo ?ernego skryptu w ?yciu nie widzia?em :O
Po jak? choler? u?ywasz pierdyliard razy funkcji getPlayerVocation??

getCreatureMaxHealth(cid) - 1000
Pomy?l, gracz ma 150 hp i odejmujesz 1k, ile zostanie?
 
Odp: function onLogin(cid) problem

arkam prosze cie nie rozpierdalaj mi uczu? ok ? napisa?em w po?cie ?e jak co? ?le napisa?em prosze poprawi?, a taki idiota kt?ry czyta? nie umie i tak zacznie hejtowa?, japierdole co twoja matka[bez obrazy dla niej] musia?a sniegu zje?? ?eby takiego ba?wana sp?odzi?... Nie trawie takich ludzi jak ty. Pomy?l zanim co? nast?pnym razem napiszesz :) a zerowcem to sobie ojca nazywaj jak ci pozwoli, bo jakbym mia? takiego syna to bym mu internet odci??, tacy ludzie jak ty powinni mie? do?ywotni zakaz korzystania z internetu dla w?asnego bezpiecze?stwa.

Notka moderatorska:
Dostajesz upomnienie na och?oni?cie.
 
Ostatnio edytowane przez moderatora:
Odp: function onLogin(cid) problem

Doda?em takie co? : <event type="login" name="Logujo" event="script" value="logujo.lua"/>

---Aktualizacja---

Bardziej zasobo ?ernego skryptu w ?yciu nie widzia?em :O
Po jak? choler? u?ywasz pierdyliard razy funkcji getPlayerVocation??

getCreatureMaxHealth(cid) - 1000
Pomy?l, gracz ma 150 hp i odejmujesz 1k, ile zostanie?

Tylko ten skrypt ma polega? na tym aby odejmowa? np 1k hp po transformacji, transformacja jest na 30lvl dajmy, ze posta? ma ju? na 30lvl bez transa 3k hp i many, w??cza transformacje to dostaje 1k hp i many. A chce aby po wylogowaniu odejmowa?o jej ten 1k hp i many. Ze skryptem na transformacje sobie poradzi?em aby dodawa?o a potem odejmowa?o, teraz problem mam z tym w?asne wylogowaniem.
 
Odp: function onLogin(cid) problem

arkam prosze cie nie rozpierdalaj mi uczu? ok ? napisa?em w po?cie ?e jak co? ?le napisa?em prosze poprawi?, a taki idiota kt?ry czyta? nie umie i tak zacznie hejtowa?, japierdole co twoja matka[bez obrazy dla niej] musia?a sniegu zje?? ?eby takiego ba?wana sp?odzi?... Nie trawie takich ludzi jak ty. Pomy?l zanim co? nast?pnym razem napiszesz a zerowcem to sobie ojca nazywaj jak ci pozwoli, bo jakbym mia? takiego syna to bym mu internet odci??, tacy ludzie jak ty powinni mie? do?ywotni zakaz korzystania z internetu dla w?asnego bezpiecze?stwa.

Ty w dupe jebany gimbusie, po swoich starych mo?esz je?dzi? jak dzieci w szkole po tobie, jeste? jebanym zerem kt?re nic nie potrafi i wpierdala swoj? zasran? dup? w temat, w kt?rym tylko przeszkadza, takich nou-nejm?w jak ty powinni zagazowywa? zaraz po urodzeniu, bo rozchodz? si? jak HIV, niszcz?c przy tym wszytko po czym przejd?, g?wno umia?e?, g?wno umiesz i g?wno b?dziesz umia?, b?dziesz gimbusem do ko?ca swoich dni, bo widzisz, niekt?rzy (tak jak tw?j przypadek) maj? taki zajebany stan umys?u i jebni?te ego, jak masz jeszcze co? mi do powiedzenia to zapraszam na tsa tnp o 17 ;) przyjebany dzieciak..

@Topic, poka? co doda?e? w login.lua
A co do reszty skryptu zamie? to jak?? prost? p?tl?, bo przy wi?kszej ilo?ci graczy mo?e nie?le zalagowa? serva ;/
 
Odp: function onLogin(cid) problem

Doda?em takie co?.

PHP:
function onLogin(cid)  
registerCreatureEvent(cid, "Logujo")

@up
Skryptami zajmuje si? od ok. tygodnia wiec z p?tlami raczej sobie nie poradz?.
Transformacje mam zrobione w sytemie kolumn i revert te? bo kolega mi pom?g?.
A to zrobi?em jak najpro?ciej umia?em.
 
Ostatnia edycja:
Odp: function onLogin(cid) problem

Dla odmiany napisz? co? na temat.
<event type="login" name="Logujo" event="script" value="logujo.lua"/>
Masz to, wi?c nie wiem po co dodajesz 'registerCreatureEvent(cid, 'logujo')' w login. Event type "login" uruchamia si? przy logowaniu, wi?c wystarczy, ?e go wrzucisz do XML.

Po drugie o ile dobrze pami?tam umiejscowienie 'return true' ma znaczenia, a twoje jest w z?ym miejscu.
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 216 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
return true
end
end
Masz tak jak wy?ej, a powinno by? tak jak ni?ej:
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
elseif getPlayerVocation(cid) == 216 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-1000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-1000)
end
return true
end
Tak samo jak w actions. Je?li w skrypcie onUse nie dodasz na ko?cu 'return true', w sensie po poprawnym wykonaniu skryptu, to wywali wiadomo?? sorry not possible/you can't do that, ale skrypt si? wykona (powinien).

Tak przynajmniej ja to pami?tam, jak nie dzia?a to sory :<

Notka moderatorska:
+1 OT Expert.
 
Ostatnio edytowane przez moderatora:
Odp: function onLogin(cid) problem

PHP:
local vocs = {
	[2] = {mana=1000, health=1000},
	[3] = {mana=3000, health=3000},
}
	
	
function onLogin(cid) 
	local v = vocs[getPlayerVocation(cid)]
	if not(v) then
		return TRUE
	end
	setCreaturerMaxMana(cid, ((getCreatureMaxMana(cid) >= v.mana) and (getCreatureMaxMana(cid)-v.mana) or 0)) 
	setCreaturerMaxHealth(cid, ((getCreatureMaxHealth(cid) > v.health) and (getCreatureMaxHealth(cid)-v.health) or 1)) 
	return TRUE
end
pododawaj se wi?cej profek
 
Odp: function onLogin(cid) problem

@ Sheyki
All dzia?a pi?knie, jeszcze spr?buje z skryptem ersiu.
 
Status
Zamknięty.
Back
Do góry