• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Talkaction/Action

Hey, I've seen tones of your threads asking for help but it doesn't look like you are even attempting to do it yourself.. Why dont you give it a try first and if it doesn't work, Post your code and people will look.
 
Hey, I've seen tones of your threads asking for help but it doesn't look like you are even attempting to do it yourself.. Why dont you give it a try first and if it doesn't work, Post your code and people will look.
tons of helping? lol!? but i already searched about it and tried but full failed
 
Can you explain this a little more?

For example, I could simply make the script:
Code:
function onSay(cid, words, param)
   if(param == "") then
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param. Correct use /addPoints nameOfPlayer, points.")
     return true
   end

   local t = string.explode(param, ",")
   if(not t[2]) then
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enough params. Correct use /addPoints nameOfPlayer, points.")
     return true
   end

   pid = getPlayerByNameWildcard(t[1])
   if isCreature(pid) then
     local points = getPlayerStorageValue(pid, "points")
     if points == -1 then points = 0 end
     points = points + t[2]
     doPlayerSetStorageValue(pid, "points", points)
     doCreatureSay(pid, "Yay! I now have "..points.." points!", 1)
   end
   return true
end

Which would allow you to give someone points and store it as a storage value.
 
Last edited:
Can you explain this a little more?

For example, I could simply make the script:
Code:
function onSay(cid, words, param)
   if(param == "") then
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param. Correct use /addPoints nameOfPlayer, points.")
     return true
   end

   local t = string.explode(param, ",")
   if(not t[2]) then
     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enough params. Correct use /addPoints nameOfPlayer, points.")
     return true
   end

   pid = getPlayerByNameWildcard(t[1])
   if isCreature(pid) then
     local points = getPlayerStorageValue(pid, "points")
     if points == -1 then points == 0 end
     points = points + t[2]
     doPlayerSetStorageValue(pid, "points", points)
     doCreatureSay(pid, "Yay! I now have "..points.." points!", 1)
   end
   return true
end

Which would allow you to give someone points and store it as a storage value.
mmm at first thanks but what is command for it? :D and i wanted talkaction to give me points without get level cuz this system working with getting level you gain X point and i need item onuse too to gain points
 
Your first language is not english is it?
yea its not :( this is problem i know
EDITED
btw found this error
Code:
[05/02/2015 00:12:58] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/give.lua:16: '=' expected near '=='
[05/02/2015 00:12:58] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/give.lua)
[05/02/2015 00:12:58] data/talkactions/scripts/give.lua:16: '=' expected near '=='
 
I fixed my script! Sorry I had an extra = sign.

My script doesn't give experience, it just gives a storage value.

I am not exactly sure what you want....
 
Are you using that guys' scripts to give players points when they level?
yea and they are using these points to upgrade skills/magic etc , my request is to make talkaction to give storage value of these points or how ever this working but i need to give same points as reward
 
Back
Top