What's new

Skrypty & Kody Skrypt Pomoc

Status
Not open for further replies.

Kolokim

User
Joined
Jun 23, 2011
Messages
28
Reaction score
0
Potrzebuje skrypt kt?ry by zapisywa? do odpowiedniego storage ile og?lnie dana posta? zabi?a og?lnie wszystkich potwor?w.

Napisa?em taki skrypt ale jest w nim pewnie mn?stwo b??d?w.
[LUA]function onKill(cid, target, lastHit)

doCreatureSetStorage(cid, 99998,+ 1)
doCreatureSetStorage(cid, + 1)
end
return true
end[/LUA]

Notka moderatorska:
Staraj si? u?ywa? nowych znacznik?w.
 

Kahras

Senior User
Joined
Aug 26, 2011
Messages
2,714
Reaction score
167
Age
25
Odp: Skrypt Pomoc

Po pierwsze skrypty wk?adamy w znaczniki php b?d? te nowe zale?y kto ma jakie upodobania.
Nie wiem czy dobre parametry w ifie wpisa?em.
[lua]-- * Author: Kahras --
-- * Contact: Tibia.net.pl --
function onKill(cid, target)
local storage = 99998
if getCreatureName(target)then
doCreatureSetStorage(cid, storage, getPlayerStorageValue(cid, storage)+1)
end
return true
end[/lua]
 
Last edited:

Kolokim

User
Joined
Jun 23, 2011
Messages
28
Reaction score
0
Odp: Skrypt Pomoc

Tw?j skrypt nie dzia?a a mianowicie jak zabije potwora on dalej stoi ale znika jego hp oraz jego nazwa. Bardzo prosze o pomoc
 
Last edited:

De$t

Active User
Joined
Nov 20, 2008
Messages
148
Reaction score
27
Odp: Skrypt Pomoc

A mo?e tak:

[LUA]
function onKill(cid, target, damage, flags)
local storage = getCreatureStorage(cid, 99998)
if isMonster(target) then
doCreatureSetStorage(cid, 99998, storage+1)
end
return true
end[/LUA]
 

Matt

Banned
Joined
May 9, 2013
Messages
595
Reaction score
46
Odp: Skrypt Pomoc

@up:
Skrypt wygl?da dobrze bo zlicza wszystkie, oboj?tnie jakie potwory zabite.
 
Last edited:
Status
Not open for further replies.
Top