What's new

Inne Komendy

Status
Not open for further replies.

danio9898

User
Joined
Jan 18, 2010
Messages
30
Reaction score
1
Nie wiem jak doda? komendy

!aol - daje aol za 1 cc
i
!manarune - daje manarune za 2 cc
 
Z

Zbizu

Guest
Odp: Komendy

data\talkactions\scripts

Robisz dwa pliki o tre?ci napisanej ni?ej. Edytujesz zmienne na swoje potrzeby.
zamiast runeid mo?esz da? id aola, w charges dasz 1 a w cost 10000

pliki nazywasz aol.lua i manarune.lua
PHP:
function onSay(cid, words, param)
-- zmienne
local Cost = 20000 -- price
local RuneId = 2293
local charges = 100 -- max 100, for non stackable item it is 1
local effect = 12 -- effect on player after buying
local itemname = manarune
-- koniec zmiennych
local playerpos = getCreaturePosition(cid)
    if doPlayerRemoveMoney(cid, Cost) == TRUE then
        doPlayerAddItem(cid,RuneId,charges)
        doSendMagicEffect(playerpos, effect)
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have bought a " .. itemname .. ".")
    else
            doPlayerSendCancel(cid, "You don't have enough money,  " .. itemname .. " costs " .. price .. " gold coins.")
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
    end
    return TRUE
end

nast?pnie do talkactions.xml dodajesz:

<talkaction words="!aol" script="aol.lua"/>
<talkaction words="!manarune" script="manarune.lua"/>

Pozdrawiam.
 

Nights

Ten typ ;)
Joined
May 12, 2010
Messages
350
Reaction score
32
Odp: Komendy

W silnikach sql nie ma commands.xml, bo takie akcje s? w talkactions/talkactions.xml.
 
Status
Not open for further replies.
Top