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

Ghettobird's scripts

ghettobird

LUA newbie
Joined
Aug 17, 2013
Messages
679
Reaction score
132
Location
OTland
Hey otlanders, well i'm out of ideas so i will make a scripting service here, i don't got any "rules" just don't spam the thread :p

also i'm not like teckman,ninja,cykotitan or printer I'm a BEGGINER trying to learn lua & examine myself (this thread is my exam ^_^)


anyways post anything but go easy on me :$
 
there you go

Lua:
local config = {
	idleKick = 10*60000
}

function onThink(cid, interval)
    if(getTileInfo(getCreaturePosition(cid)).nologout or getCreatureNoMove(cid) or
        getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_ALLOWIDLE)) then
        return true
    end
	
	local idleTime = getPlayerIdleTime(cid) + interval
	 doPlayerSetIdleTime(cid, idleTime)
	  if(config.idleKick > 0 and idleTime > config.idleKick) then
        doRemoveCreature(cid)
		end 
	return true
		end

PS: mine could be um not so good but atleast i tried ^_^
 
sorry i kind of forgot this thread, anyway yes i did PM you more than once

@anyone else: if you need a simple script post the idea here and I'll try to make them :peace:
 
ok lets try this ^^ id like a simple script so when you throw a bag of loot into the blue fire, it sells all loot and money goes to your backpack, if its possible add first line for a item to sell, and i can add the rest :) also if this script is to much i can offer $5.00 for the script if it works 100%.
 
that's a simple script? if that's your idea of a simple script then a complicated script would be...? -.-

I'll back you up with this one, this is actually not a simple script.
It is also not a complicated script either, this script is somewhere in the middle.

Nevertheless, this looks like a fun script to work on, I might even play around and see if I can get it to work (no promises).

In movements, there is an event method called onAddItem().
When a container full of items is placed on a specific tile or item or w/e, the script will then loop through the containers
slot by slot searching through a table of "sellable" items. Remove the items as you go through the container and add up the
gold count. Then when it reaches the end, give the player the money.
 
I'll back you up with this one, this is actually not a simple script.
It is also not a complicated script either, this script is somewhere in the middle.

Nevertheless, this looks like a fun script to work on, I might even play around and see if I can get it to work (no promises).

In movements, there is an event method called onAddItem().
When a container full of items is placed on a specific tile or item or w/e, the script will then loop through the containers
slot by slot searching through a table of "sellable" items. Remove the items as you go through the container and add up the
gold count. Then when it reaches the end, give the player the money.

There's not a thing Evan does not know, kids.
 
If you feel like making a script, make it so that when you reach 0 hp (not an ondeath script), make it so that the items you would drop would go on top of your body, instead of inside your corpse.

Since this is suppose to be an 'exam', you get bonus points if you make it so each inventory slot has it's own % chance to drop, also opening up the option to allow to protect each individual slot from dropping by outside means. (such as a 'blessing'/storage value that always saves your chest slot, for example).


For double bonus round points, make it so that you always drop your backpack (unless protected) plus one other slot chosen at random. Additionally, make the script check your frags, and (configurable), the amount of frags you have will force you to drop additional slots.

Example chart

Frags - Drop
0 Backpack + 1 random slot
1-5 Backpack + 2 random slots
5-8 Backpack + 3 random slots
8-10 Backpack + 4 random slots
10-12 Backpack + 5 random slots
12-14 Backpack + 6 random slots
14-16 Backpack + 7 random slots
16-18 Backpack + 8 random slots
18+ Backpack + 9 random slots



Goodluck! :D
 
Back
Top