• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

A Pack Of Talkaction :P [Newbies]

Imfreezing

Krossa Kapitalismen
Joined
Jun 7, 2012
Messages
1,009
Solutions
1
Reaction score
88
Location
Edron
Hello Everyone before we start i ll warn you for my (extremly bad english) but i hope you guys ill understand :p
Btw here We Go for our first and a very simple script .!aol First go to Data/Talkaction/talkaction.Xml and put this
XML:
<talkaction words="!aol" script="aol.lua" />
And then go to Data/Talkactions/scripts and make a file Name "aol.lua" And put this in it
Lua:
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid, 10000) == TRUE then ----------10000= 1 cc
doPlayerAddItem(cid, 2173, 1) ----- ITEM ID
doSendMagicEffect(getPlayerPosition(cid), 31)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'There You Go!') -------desc When succes Buy an aol
else
doPlayerSendCancel(cid, "You need 1 crystal coin to buy a Amulet Of Loss!") -----Desc If u not have money enough
end
return TRUE
end
Simple :p Next out is "Bless" First go to Data/talkaction/talkaction.xml and put this
XML:
        <talkaction words="!bless" script="bless.lua" />
Then go to Data/Talkactions/scripts and make a file Name "Bless.lua" and put this in there
Lua:
function onSay(cid, words, param)
    if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) or getPlayerBlessing(cid, 4) or getPlayerBlessing(cid, 5) then
        doPlayerSendCancel(cid,'You have already got one or more blessings!')
    else
        if doPlayerRemoveMoney(cid, 60000) == TRUE then ---------60000=6cc
            doPlayerAddBlessing(cid, 1) ------------Bless 1
            doPlayerAddBlessing(cid, 2) ----------Bless 2
            doPlayerAddBlessing(cid, 3) ---------bless 3
            doPlayerAddBlessing(cid, 4) -------bless 4
            doPlayerAddBlessing(cid, 5) -----Bless 5
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE) -----effect
            doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have been blessed by the gods!') -------TEXT When ure get blessed
        else
            doPlayerSendCancel(cid, "You need 6 crystal coin to get blessed!") ------Desc IF FAil
        end
    end    
    return 1
end
Thank you , Uptading more, please "pros" Do not comment lika "Noob,simple,shiet,useless,Etc," IF i helped A rep do not hurts me :p ^^:$

- - - Updated - - -

Uptade ^^
First Start with "AFK System" goto Data/Talkaction/Talkaction.Xml And put this in there
XML:
        <talkaction access="2" words="!afk" event="script" value="afk.lua"/>
as you can see i had put ACCES "2" becouse i had fix it so only STAFFs Can do that command,If u to everyone can do it change it to
XML:
        <talkaction  words="!afk" event="script" value="afk.lua"/>
btw Goto data/talkaction/scripts and create a lua file And rename it too Afk.lua and put this in there
Lua:
--[[ 
    Talking Tp/signs/tiles for TFS 0.2+
    70%shawak,30%Damadgerz
    Idea by Damadgerz
]]--
    local time = 3    -- 1 = 1 sec, 2 = 2 sec, ...

     local say_events = {}
local function SayText(cid)
    if isPlayer(cid) == TRUE then
         if say_events[getPlayerGUID(cid)] ~= nil then
             if isPlayer(cid) == TRUE then
                 doSendAnimatedText(getPlayerPosition(cid),"AFK!", math.random(01,255))
             end
             say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1 / 2, cid)       
         end                                                       
    end
    return TRUE
end
function onSay(cid, words, param, channel) 
    if(param == '') then
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
     return true
     end
     if param == "on" then
        if isPlayer(cid) == TRUE then
            doSendAnimatedText(getPlayerPosition(cid),"AFK!", math.random(01,255))
        end
        say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid)
        doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"You Now Stated you are (afk).")
     elseif param == "off" then
            stopEvent(say_events[getPlayerGUID(cid)])
            say_events[getPlayerGUID(cid)] = nil
            doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"You Now stated your are not (afk).")
    end
    return TRUE
end
An rep coulndt hurt if i did help you :p uptades COming sooon
 
I won't say they are useless, but it's just a repost without giving credits and if you have to post scripts which aren't made by you why don't you take good ones atleast?
There are prolly already 5 threads having both !aol and !bless script in it by now.
 
This isn't supposed to be in the tutorial board, beside copy pasting it without giving credits.
 
Giving some <talkactions to newbies , they might need it :O ...Sry Then
 
Back
Top