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

does it exists ? or anyone meybe can make it

Lbtg

Advanced OT User
Joined
Nov 22, 2008
Messages
2,398
Reaction score
165
So i was looking for an event:count , that means 2+2=4 . so the event do rondomaly numbers x+x+x+x+x+x+x+x=? . and first player who will write good ansfer lets say !count55 that player get reward x item x number of that item.


World get broadcast meesage like:Get ready for count event in one minute!
after one minute:Count Event . Count it ! 4+5+7+9+6+6+7+6=? to write an ansfer say !count(your nr) , you people got 2 minutes to give me a good ansfer if no one will give a good ansfer the event will stop and say "next count event in 2 hours"
and if player write wrong ansfer event says to plaayer:your wrong , try to count again ! +-


so is it posible to make as mod ? or something like that ? or meybe it already exists ?well i searched for something like that but didint find anything...


Sorry for me poor english , i hope you understand me
 
tryed to make it work at me server but got error
HTML:
[18/05/2012 23:20:52] [Error - GlobalEvent Interface] 
[18/05/2012 23:20:52] data/globalevents/scripts/count.lua:onThink
[18/05/2012 23:20:52] Description: 
[18/05/2012 23:20:52] data/globalevents/scripts/count.lua:14: attempt to call global 'setGlobalStorageString' (a nil value)
[18/05/2012 23:20:52] stack traceback:
[18/05/2012 23:20:52] 	data/globalevents/scripts/count.lua:14: in function <data/globalevents/scripts/count.lua:5>
[18/05/2012 23:20:52] [Error - GlobalEvents::think] Couldn't execute event: count
 
tryed to make it work at me server but got error
HTML:
[18/05/2012 23:20:52] [Error - GlobalEvent Interface] 
[18/05/2012 23:20:52] data/globalevents/scripts/count.lua:onThink
[18/05/2012 23:20:52] Description: 
[18/05/2012 23:20:52] data/globalevents/scripts/count.lua:14: attempt to call global 'setGlobalStorageString' (a nil value)
[18/05/2012 23:20:52] stack traceback:
[18/05/2012 23:20:52] 	data/globalevents/scripts/count.lua:14: in function <data/globalevents/scripts/count.lua:5>
[18/05/2012 23:20:52] [Error - GlobalEvents::think] Couldn't execute event: count

The function setGlobalSTorageString doesn't exist.
 
This may work :)

Execute this query in phpmyadmin:
SQL:
CREATE TABLE `global_storage_strings`
(
	`key` INT UNSIGNED NOT NULL,
	`world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
	`stringz` VARCHAR(255) NOT NULL,
	UNIQUE  (`key`, `world_id`)
) ENGINE = InnoDB;

and these in libs/050-functions.lua
LUA:
function setGlobalStorageString(key, string)
    return db.executeQuery("INSERT INTO `global_storage_strings`(`key`, `world_id`, `stringz`) VALUES (".. key ..", 0, ".. string ..");")
end

function getGlobalStorageString(key)
    local Info = db.getResult("SELECT `stringz` FROM `global_storage_strings` WHERE `key` = ".. key .."")
        if Info:getID() ~= -1 then
        local ret = Info:getDataString("stringz")
        Info:free()
        return ret
    end
     return true
end

Try Rohan-Ots script again now ;)
 
Last edited:
I hate to bump an old thread but I am having the same problem with this script, however after adding the table to the database and the lines of code to 050-function.lua,
I am getting this error in the console:

Code:
mysql_real_query(): INSERT INTO `global_storage_strings`(`key`, `world_id`, `stringz`) VALUES (1337, 0, TXVHMQLXHK); - MYSQL ERROR: Unknown column 'TXVHMQLXHK' in 'field list' (1054)

for some reason it thinks the column should be the random string instead of the defined column stringz?

here is the line in 050-function.lua:

LUA:
function setGlobalStorageString(key, string)
    return db.executeQuery("INSERT INTO `global_storage_strings`(`key`, `world_id`, `stringz`) VALUES (".. key ..", 0, ".. string ..");")
end
 
A simple broadcast event that can be easily abused by the power of hotkeys.. And if its 8.6 I feel bad for you.. cause its way too easy to win with elfbot if you put it answer as a presistent hotkey... I wouldn't make something like this if I was you.

Example
Code:
auto 100 if this happens | say "!fastest"

Its just an example how elfbot works.. and theese kinds of things are easy to abuse with elfbot.. Any other version just put the answer in ctrl+ F1-F12 and click all of them as fast as you can when something pops up and you are sure to get the reward. Have even seen GM's answering theese questions cause they got no cooldown when they use talkactions or talk in general. (Abuse)
 
Back
Top