• 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!

Actions, talk action, creature. - Request~ Need help with some scripts for 9.60.

Yuji

Helper
Joined
Mar 18, 2010
Messages
438
Reaction score
33
Location
U.S.A New York
Hey guys i really need help here, iv been testing some scripts that i found on this website that looked good to suit my server, but 1 out the 10 scripts i used did not work! I know 9.60 is still a little new out there but if any one would like to give it a shot and help me out here it would be nice.

Global Event, Make a square say something - I know this is a vary common script now, but iv tried every one on this website and they didn't work, Only part of the script would work, it would show the effects but no letters and it would spam that heck out my server .gui.

Action - An item that adds HP/Mana to a Character - I really never saw this script out there for anything higher then a for 7.6 because it was all .xml files, so it was easy for configure. If this isn't possible for this version of tfs then its ok.

X Talk-action - !aol that works PLEASE!- out of the 2 years of ot's and server hosting i could never get a !aol command to work! The most simplest command and i cant get it to work for any version for tfs.

Action - An item that give X amount of premium days! - Iv seen this script around but didnt work for 9.60.

Creature-event - An inf. aol that works with RS/BS - Yet another easy script that i cant get working for some dumb reason on this version of tfs.

Talk-action - !spell command - Same story with the !aol commands never could get it to work, that and the /commands command i ocould never get to work but thats not important to this server.

Talk-action - !hp commands that shows your hp/mana...

And Lastly- A program that i can make spells with for 9.60 - I'v tried 3 diffrent spell makers that i have foud not only on this site but another and only 1 of them worked! But sadly once iv uploaded the .spr all the effects where outa place and it was hard to see what i was doing. And once casting the spell i made it did 0 dmg :p

For all these things i need I have looked and searched....

I might need more but if i could just get these i would be vary thankful, It's only the simple things that i need lol. Most commands / scripts here are only for 8.- 8.60, So thats why i am here now asking kindly for some help, Please and thanks!
 
Last edited:
Talkaction:
I have wrote this script for my 9.6 server and it works for me.
try this and report back to me:
put on data/talkactions/scripts on file name aol.lua
Lua:
function onSay(cid, words, param)
if getPlayerLevel(cid) < 1 then
doPlayerSendCancel(cid,'You have not premium days')
else
if doPlayerRemoveMoney(cid, 20000) == TRUE then
doPlayerAddBlessing(cid, 1)
doPlayerGiveItem(cid, 2173, 1)
doSendMagicEffect(getPlayerPosition(cid), 28)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'You have bought aol.')
else
doPlayerSendCancel(cid, "You need 20.000 gold coins to get aol!")
end
end
return TRUE
end

xml part:
XML:
    <talkaction words="!aol;/aol" script="aol.lua"/>

- - - Updated - - -

Actions:
the script which add premium points on use item ;s

In data/libs create 048-ppoints.lua
and paste the following
Lua:
[/COLOR]-- Sirion_Mido Says: Credites to: LucasFerraz
-- Sirion_Mido Says: Credites to: LucasFerraz
-- Sirion_Mido Says: Credites to: LucasFerraz
 
function getAccountPoints(cid)
    local res = db.getResult('select `premium_points` from accounts where name = \''..getPlayerAccount(cid)..'\'')
    if(res:getID() == -1) then
       return false
    end
    local ret = res:getDataInt("premium_points")
    res:free()
    return tonumber(ret)
end
 
function doAccountAddPoints(cid, count)
    return db.executeQuery("UPDATE `accounts` SET `premium_points` = '".. getAccountPoints(cid) + count .."' WHERE `name` ='"..getPlayerAccount(cid).."'")
end
 
 
-- Sirion_Mido Says: Credites to: LucasFerraz
-- Sirion_Mido Says: Credites to: LucasFerraz
-- Sirion_Mido Says: Credites to: LucasFerraz[COLOR=#000000]


now:
In data/actions/scripts create points.lua
paste the following:
Lua:
local cfg = {
    amount = 10       -- here how many points you want
  }



function onUse(cid, item, fromPosition, itemEx, toPosition)  
  
                if getPlayerLevel(cid) > 8 then
                doAccountAddPoints(cid, cfg.amount)
                doCreatureSay(cid, "CONGRATULATIONS! You have recived 10 premium points!. ", TALKTYPE_ORANGE_1)
                doSendMagicEffect(getCreaturePosition(cid), 28)
                doRemoveItem(item.uid,1)
                else
                doPlayerSendCancel(cid,"You need level 8 or higher to use this item.")
                end
                return TRUE
                end

now xml part:
on data/actions.xml
paste the following:
XML:
    <action itemid="5952" event="script" value="points.lua"/>
 
Last edited:
Umm im not sure, i went to data/action/libs and created 048-ppoints.lua with the things you tolled me to put in it, then created points.lua, and then went in the .xml and copied and pasted the thing there and restated the server and it didnt work =/
 
Last edited:
listen i have fixed the lib part
048-ppoints.lua
it should work now
to this code:
Lua:
-- Sirion_Mido Says: Credites to: LucasFerraz
-- Sirion_Mido Says: Credites to: LucasFerraz
-- Sirion_Mido Says: Credites to: LucasFerraz
 
function getAccountPoints(cid)
    local res = db.getResult('select `premium_points` from accounts where name = \''..getPlayerAccount(cid)..'\'')
    if(res:getID() == -1) then
       return false
    end
    local ret = res:getDataInt("premium_points")
    res:free()
    return tonumber(ret)
end
 
function doAccountAddPoints(cid, count)
    return db.executeQuery("UPDATE `accounts` SET `premium_points` = '".. getAccountPoints(cid) + count .."' WHERE `name` ='"..getPlayerAccount(cid).."'")
end
 
 
-- Sirion_Mido Says: Credites to: LucasFerraz
-- Sirion_Mido Says: Credites to: LucasFerraz
-- Sirion_Mido Says: Credites to: LucasFerraz

- - - Updated - - -

Nope no errors, Umm but question am i supposed to go to data/action/libs? or a different libs? cuz there is no data/libs in my tfs folder
and there on all servers should be a lib folder on : data/lib
but there is different servers not have a lib folder on data
so try use another TFS
 
I think that you can remove this from the aol TalkAction
if getPlayerLevel(cid) < 1 then
doPlayerSendCancel(cid,'You have not premium days')
else

couse i dont think that a player can have a level that is lower than 1 ^_^ anyways im new at this and not pretty sure :blink:
 
Back
Top