• 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,286
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:
I understand that the life system is pretty big, don't worry about it! :D

I'll make another request though.

A creaturescript called "Call for Help!".

Basically, it's for a monster, and when it gets attacked/dealt damage and reaches a certain % of HP, the call for help creature script activates.

What it does is, it makes monsters around the monster that does the call for help.

Some of the monsters will always spawn, some will have a % chance of spawning.

The example for it is:

A penguin gets attacked below 90% HP, it does the call for help, and then the creature script has a chance of spawning a king penguin (2% chance) or 1-3 penguin guards (50% chance).

Care to take a try at this one?
 
Yes ill try to do it, when i get the time. Also other in this theard can also fufil the requests, feel free to help :)
 
ye, if voc 1 2 3 dies his res. is tem'ple id 1 so'he always reborns there whn he dies, same for voc 4 5 6
 
Cyko,

Lets Say there is 5 Castles
Player Buys item in Sms Shop
Uses the Item
and It gives Him a Castle (House) (Random) Picks one of the 5 Castles
After all 5 Castles are Owned
When the Player uses the Items it says "Sorry But all Castles are Owned"

Could you Make that ??

Repp++ For help :)
 
@amiroslo: Maybe you remember me for doing you a lot of scripts xDDD

Lua:
function onPrepareDeath(cid)
if isInArray({1, 2, 3}, getPlayerVocation(cid)) then
doPlayerSetTown(cid, 1)
elseif isInarray({4, 5, 6}, getPlayerVocation(cid)) then
doPlayerSetTown(cid, 2)
end
return true
end

I think you know how to edit it ;)
 
Didnt test, but should work. Enjoy!
Lua:
local Cyko = {
    town1 = {
    vocations = {1, 2, 3, 4},
    townid = 1,
    },
    town2 = {
    vocations = {5, 6, 7, 8},
    townid = 2
    }
} 
 
function onLogin(cid)
	if (isInArray(Cyko.town1.vocations, getPlayerVocation(cid))) then
		doPlayerSetTown(cid, townid)
	elseif (isInArray(Cyko.town2.vocations, getPlayerVocation(cid))) then
		doPlayerSetTown(cid, townid)
		end
	return true
end

- - - Updated - - -

Ah Dantarrix didnt see you post a script xD
 
I think this is more sure that the player will respawn on it's temple:
Lua:
local Cyko = {
    town1 = {
		vocations = {1, 2, 3, 4},
		townid = 1
    },
    town2 = {
		vocations = {5, 6, 7, 8},
		townid = 2

    }		
	deathStorage = 999
} 
 
function onLogin(cid)
	if(Cyko.deathStorage == "Dead") then
		if (isInArray(Cyko.town1.vocations, getPlayerVocation(cid))) then
			doPlayerSetTown(cid, town1.townid)
			doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))
		elseif (isInArray(Cyko.town2.vocations, getPlayerVocation(cid))) then
			doPlayerSetTown(cid, town2.townid)
			doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))
		end
		setPlayerStorageValue(cid, Cyko.deathStorage, -1)
	end
	return true
end

create a onDeath file:
Lua:
local deathStorage = 999
function onDeath(cid, corpse)
	setPlayerStorageValue(cid, deathStorage, "Dead")
	return true
end

Register them both in login.lua and creaturescript.xml aswell.
 
Last edited:
But still the server will teleport them automatic to the temple when they die.
 
You can do that, but still if Amir made like a chest or something on the beginning, which teleport them first time to their respective temple. Then its enough with my script, since you dot need execute everytime ondeath and login.

But still nice to see you help OTx :D
 
I need an npc that changes the outfit of a player, but only if that player has a certain storage id.

Player - Hi
NPC - hello
Player - frog
(if player has quest done 'storage =30001'
NPC - You have turned into the outfit Frog. (outfit id 36)
(if player does not have quest done
NPC - You do not have the frog outfit





I need this npc because the tibia client is limited to 25 outfits. I want to make quests that give monster look-types for players to choose at anytime.

hopefully this npc can do more then 1 outfit as well!

inside outfits.xml I have this

XML:
	 <outfit id="36" quest="30001" premium="yes">
		<list gender="0-3" lookType="307" name="Mutated Bat"/>
	</outfit>

I also have an npc that gives you the storage value 30001
But the players cannot change their outfit because it is past outfit id 25 - which the client limits them too.
So I need this npc to change their outfit for them using keywords :eek:

Hopefully your able to make this <33

I wouldn't mind if it just changed their looktype to 307 either, but only if it checked for the storage value first!
 
Try this out:

Lua:
local cyko = {
storage = 30001, 
outfit = {lookType = 36}
}
 
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
 
local Topic = {}
function onCreatureAppear(cid)				npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) 			npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) 	npcHandler:onCreatureSay(cid, type, msg) end
function onThink() 						npcHandler:onThink() end
 
function creatureSayCallback(cid, type, msg)
	if not npcHandler:isFocused(cid) then
		return false
	end
 
	if msgcontains(msg, 'frog') or msgcontains(msg, 'outfit') or msgcontains(msg, 'quest') then
			npcHandler:say('Hello did you complete the frog outfit quest?. {yes}', cid)
			elseif(msgcontains(msg, 'yes')) then
			if getPlayerStorageValue(cid, cyko.storage) == 1 then
               if isPlayer(cid) then	    
                doPlayerAddOutfit(cid,cyko.outfit)
				npcHandler:say('Here you go!', cid)
				focus = 0
			else
				npcHandler:say('Sorry, but only those which made the quest can get my attention.', cid)
	    end
	end
end
	return true
end
 
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
Try this out:

Lua:
local cyko = {
storage = 30001, 
outfit = {lookType = 36}
}
 
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
 
local Topic = {}
function onCreatureAppear(cid)				npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) 			npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) 	npcHandler:onCreatureSay(cid, type, msg) end
function onThink() 						npcHandler:onThink() end
 
function creatureSayCallback(cid, type, msg)
	if not npcHandler:isFocused(cid) then
		return false
	end
 
	if msgcontains(msg, 'frog') or msgcontains(msg, 'outfit') or msgcontains(msg, 'quest') then
			npcHandler:say('Hello did you complete the frog outfit quest?. {yes}', cid)
			elseif(msgcontains(msg, 'yes')) then
			if getPlayerStorageValue(cid, cyko.storage) == 1 then
               if isPlayer(cid) then	    
                doPlayerAddOutfit(cid,cyko.outfit)
				npcHandler:say('Here you go!', cid)
				focus = 0
			else
				npcHandler:say('Sorry, but only those which made the quest can get my attention.', cid)
	    end
	end
end
	return true
end
 
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())


Whenever I spawn the npc it does this

13:32 Outfit Changer Npc: Hello, Half Reviser.
13:33 Half Reviser [8]: frog
13:33 Outfit Changer Npc: Hello did you complete the frog outfit quest?. yes

if I say yes at this point the npc does not respond - also the 'yes' at the end is dark blue
 
Any errors on console and the yes should be dark blue since its highligted.
 
Hello Cyko,
I Need one script , one npc where You can rent horse mount ,this mount during 1 day, after 30 mounts rented player cant rent more horse but appear 3 respaws wild horse in map..
 
Hello Cyko,
I Need one script , one npc where You can rent horse mount ,this mount during 1 day, after 30 mounts rented player cant rent more horse but appear 3 respaws wild horse in map..

I saw this, but sorry im not doing npc script which are bit advanced, since im not good enough to do it :/
 
Back
Top