Skrypty & Kody Scroll od Levela

enibiaots

User
Zarejestrowany
Dołączył
Maj 31, 2016
Posty
41
Liczba reakcji
0
Kod:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 5957 then
local playerpos = getCreaturePosition(cid)
doRemoveItem(item.uid,5957)
doPlayerAddItems(id, 5423)
doSendMagicEffect(playerpos, 34)
doPlayerSendTextMessage(cid,22,"You received legendary sword.")
end
end
Witam jak zrobi? ?eby ten scroll mozna bylo u?y? na xxx levelu ?
 
Odp: Scroll od Levela

Witaj, nale?y doda? funkcj?.
[lua]getPlayerLevel(cid)[/lua]
W tym przypadku
[lua]local level = X
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 5957 then
if (getPlayerLevel(cid) > level) then
local playerpos = getCreaturePosition(cid)
doRemoveItem(item.uid,5957)
doPlayerAddItem(cid, 5423, 1)
doSendMagicEffect(playerpos, 34)
doPlayerSendTextMessage(cid,22,"You received legendary sword.")
else
doPlayerSendTextMessage(cid,22,"You need level " .. level .. " to use this item.")
end
end
end[/lua]
 
Ostatnia edycja:
Odp: Scroll od Levela

Witaj, nale?y doda? funkcj?.
[lua]getPlayerLevel(cid)[/lua]
W tym przypadku
[lua]
local level = X
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 5957 then
if (getPlayerLevel(cid) > level) then
local playerpos = getCreaturePosition(cid)
doRemoveItem(item.uid,5957)
doPlayerAddItems(id, 5423)
doSendMagicEffect(playerpos, 34)
doPlayerSendTextMessage(cid,22,"You received legendary sword.")
else
doPlayerSendTextMessage(cid,22,"You need level " .. level .. " to use this item.")
end
end
end[/lua]
Niestety niedzia?a.
 
Odp: Scroll od Levela

B??d mia?e? w skrypcie dlatego nie dzia?a. Za X podstaw wymagany level.
Edytowa?em 1 post.
 
Odp: Scroll od Levela

Najlepiej jakby da?o si? napisac od zera skrypt . Item o id xx daje item o id xx i ze mozna go uzyc tylko na poziomie 150.

---------- Tre?? dodana o 17:02 ----------

Kod:
    local level = 8
    function onUse(cid, item, frompos, item2, topos)
    if item.itemid == 5957 then
    if (getPlayerLevel(cid) > level) then
    local playerpos = getCreaturePosition(cid)
    doRemoveItem(item.uid,5957)
    doPlayerAddItem(cid,13487, 1)
    doSendMagicEffect(playerpos, 34)
    doPlayerSendTextMessage(cid,22,"You received legendary sword.")
    else
    doPlayerSendTextMessage(cid,22,"You need level " .. level .. " to use this item.")
    end
    end
    end
I na levelu 10 moge uzyc tego scrola.
 
Odp: Scroll od Levela

Aaa, Ty chcesz tylko na danym levelu. My?la?em, ?e od danego lvla, m?j b??d.
[lua] local level = 8
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 5957 then
if (getPlayerLevel(cid) == level) then
local playerpos = getCreaturePosition(cid)
doRemoveItem(item.uid,5957)
doPlayerAddItem(cid,13487, 1)
doSendMagicEffect(playerpos, 34)
doPlayerSendTextMessage(cid,22,"You received legendary sword.")
else
doPlayerSendTextMessage(cid,22,"You need level " .. level .. " to use this item.")
end
end
end[/lua]
 
Back
Do góry