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

Otswe Free Scripting Service (Actions/Movements/Creaturescripts) Open Again!

Printer

if Printer then print("LUA") end
Senator
Premium User
Joined
Dec 27, 2009
Messages
5,782
Solutions
31
Reaction score
2,287
Location
Sweden?
Cyko Free Scripting Service (Actions/Movements/Creaturescripts/Talkactions) ReOpen!

Hello,

I decide to make scripts depending on players request.

Why im doing this?
Ticket to hevean? <- Also helping people and learn the lua language.
Please post below and i will hopefully be able to make the script you desire.

I repon Otswe Free Scripting Service, Ill only accept medium hard scripts. Follow these rules and we are good to go!

Rule number 1: No Spamming!
Rule number 2: Be Patient!
Rule number 3: There is no rule number 3!
Rule number 4: Follow all these rules!

Asfar you can see i accept only Actions/Movements/Creaturescripts/Talkactions/Globalevents! But ill accept npcs to, but depends how hard the request is.
My scripting Corner! Here you will be able to find scripts :D

My Scripts:
Need Special Storage To Enter The Platform!
Open Secret Hole - Timer!
Fire Explosion Into Area!
Remove Swarms From Magical Bushs!
Simple Upgrade Item!
Automatic Cleaning Spefic Area!
Magic Wall With Countdown!
Premium Scroll!
http://otland.net/f81/anti-lure-monster-v-1-otswe-171236/
http://otland.net/f81/advance-tutorial-hints-script-easy-configure-170739/
http://otland.net/f81/house-system-171153/
http://otland.net/f82/update-automatic-currently-health-mana-172129/
Check Points - Advanced!

Older Scripts:
Simple Premium Tile!
Exp Token!
Throw item get teleported!
 
Last edited:
@Sportacus

Hiho, this request is big and dont know if ill have time to make it. But we will see.
 
Idk if this work, but you get idea how to do it.

Lua:
local otswe_magic = math.random(5,10)
local remove_soul_using_spell = -20
local fail_msg = "You dont have enough of soul"
 
 
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)
 
local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)
 
function onGetFormulaValues(cid, level, skill, attack, factor)
	local skillTotal, levelTotal = skill + attack * 2, level / 5
	return -(skillTotal * 1.1 + levelTotal), -(skillTotal * 3 + levelTotal)
end
 
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
		if getPlayerSoul(cid) > 0 then
			doPlayerAddSkillTry(cid, 1, otswe_magic)
			doPlayerAddSoul(cid, remove_soul_using_spell)
			doCombat(cid, combat, var)
		else
			doPlayerSendTextMessage(cid,19, fail_msg )
		end
	return true
end
 
Idk if this work, but you get idea how to do it.

Lua:
local otswe_magic = math.random(5,10)
local remove_soul_using_spell = -20
local fail_msg = "You dont have enough of soul"
 
 
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)
 
local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)
 
function onGetFormulaValues(cid, level, skill, attack, factor)
	local skillTotal, levelTotal = skill + attack * 2, level / 5
	return -(skillTotal * 1.1 + levelTotal), -(skillTotal * 3 + levelTotal)
end
 
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
		if getPlayerSoul(cid) > 0 then
			doPlayerAddSkillTry(cid, 1, otswe_magic)
			doPlayerAddSoul(cid, remove_soul_using_spell)
			doCombat(cid, combat, var)
		else
			doPlayerSendTextMessage(cid,19, fail_msg )
		end
	return true
end

this script is usefull, but for better usage i need a c++ code for new creature event like: onSoulChange(cid, soul), with this i can do a better system
 
@ADM LosT: sorry, my bad... Missing some parts of the script I dont know why...

But here it is repaired and working (tested):
Lua:
function onLook(cid, thing, position, lookDistance)
function getDeathsAndKills(cid, type) -- by vodka
    local query,d = db.getResult("SELECT `player_id` FROM "..(tostring(type) == "kill" and "`player_killers`" or "`player_deaths`").." WHERE `player_id` = "..getPlayerGUID(cid)),0
        if (query:getID() ~= -1) then 
            repeat
                d = d+1
            until not query:next()
            query:free()
        end
    return d  
end
if isPlayer(thing.uid) then
if cid ~= thing.uid then
doPlayerSetSpecialDescription(thing.uid, "\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." has Killed: ["..getDeathsAndKills(thing.uid, "kill").."] Players.\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." has Died: ["..getDeathsAndKills(thing.uid, "death").."] Times")
else
doPlayerSetSpecialDescription(cid, "\nYou have killed: ["..getDeathsAndKills(cid, "kill").."] Players.\nYou have died: ["..getDeathsAndKills(cid, "death").."] Times")
end
end
return true
end

@otswe: if you want to make posts with my scripts too, you have permission if you give some credits please... Thank you...

not work here, please help Cyko
 
PHP:
<event type="look" name="showKD" event="script" value="KillsandDeath.lua"/>
PHP:
function onLook(cid, thing, position, lookDistance)
function getDeathsAndKills(cid, type) -- by vodka
    local query,d = db.getResult("SELECT `player_id` FROM "..(tostring(type) == "kill" and "`player_killers`" or "`player_deaths`").." WHERE `player_id` = "..getPlayerGUID(cid)),0
        if (query:getID() ~= -1) then 
            repeat
                d = d+1
            until not query:next()
            query:free()
        end
    return d  
end
if isPlayer(thing.uid) then
if cid ~= thing.uid then
doPlayerSetSpecialDescription(thing.uid, "\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." has Killed: ["..getDeathsAndKills(thing.uid, "kill").."] Players.\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." has Died: ["..getDeathsAndKills(thing.uid, "death").."] Times")
else
doPlayerSetSpecialDescription(cid, "\nYou have killed: ["..getDeathsAndKills(cid, "kill").."] Players.\nYou have died: ["..getDeathsAndKills(cid, "death").."] Times")
end
end
return true
end
 
Why do you even request? When you have the knowlegde to fix it yourself.
 
Back
Top