Action Xaroth Scripting Area [All Request will appear in Main post]

RealSoft

Banned User
Joined
Feb 3, 2009
Messages
4,382
Best answers
0
Reaction score
92
Location
There I sleep
RealSoft Scripting Area [All Request will appear in Main post]

Edit April 13. this was "Xaroth Scripting Area [All Request will appear in Main post]" some time ago, but I changed name long time ago so I changed the name.

Hello Everyone..

I will make request scripts here,, all scripts will be put in this thread with some information..

Note: I will make request scripts when I got time for it..
Also:: I script for 7.6-8.0.. mabey some above 8.0.. but I will mostly keep to 8.0 or below.. but you may request etc 8.4 and I will tell you if I will make the request or not..

Also Rep++ wouldn't hurt me =)


Scripts Been Requested Latley:
1: Quest Door [a door there you need to complete a quest before you can access it]
-
2:Piggy Bank [Which gives 1-10000 gold and get broken at in first use]
-
3: Switch Teleport with payment [Used in Tombs or familiar]
-
4: Vocation door [There only one or more vocation can pass]
-
5: Wall Switch [To remove a wall]
-
6: Vocation Quest [Each vocation will get different loot, The reward comes inside a bag]
-
7: Code to Loot in a Bag [When you will loot a quest, you get the reward inside a bag.]
-
8: The Annihilator Quest [Famous Edron Quest for level 100 an above]
-



//////////////////////


1: Quest door.
To enter this door you must have made a quest or familiar.
You must enter a Unid in the mapeditor too, I recomend you tu use a normal "quest door"
Code:
<action uniqueid="[COLOR="Red"]000[/COLOR]" script="quest door.lua" />
Code:
function onUse(cid, item, frompos, item2, topos)

if item.uid == [COLOR="Red"]000[/COLOR] then --Unid of the switch
if getPlayerStorageValue(cid) == [COLOR="Red"]0000[/COLOR] then [COLOR="Indigo"]--the storage valute the player must have to pass this door.[/COLOR]
doPlayerSendTextMessage(cid, 22, "[COLOR="Red"]You may pass.[/COLOR]")
pos = getPlayerPosition(cid)

if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.y - 1
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x + 1
else
pos.x = topos.x - 1
end
else
doPlayerSendTextMessage(cid,22,'[COLOR="Red"]Please stand in front of the door.[/COLOR]')
return 1
end

doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'[COLOR="Red"]You do not have access here![/COLOR]')
end
return 1
else
return 0
end
end

//////////////////////


2: Piggy Bank
When you right click on it, it will be broken and you will get between 1 gold coin to 100 platinum coins.
Code:
<action itemid="2114" script="pig.lua" />
Code:
   function onUse(cid, item, frompos, item2, topos)
   	doTransformItem(item.uid,item.itemid+1)
	cashtype = math.random(1,100)
	cash = math.random(1,100)
	doSendMagicEffect(frompos,2)
	if cashtype >= 0 and cashtype <= 5 then
		doPlayerAddItem(cid,2152,cash)
		doPlayerSendTextMessage(cid,22,"You got out " .. cash*100 .. " gps !")
	elseif cashtype > 35 then
		doPlayerAddItem(cid,2148,cash)
		doPlayerSendTextMessage(cid,22,"You got out " .. cash .. " gps !")
	end
	doSendAnimatedText(frompos,'BANG!',180)

   	return 1
   
   end

//////////////////////


3: Switch Teleport with Payment
Often used in tombs
Code:
<action uniqueid="[COLOR="Red"]000[/COLOR]" script="[COLOR="Red"]payment switch[/COLOR].lua" />
Code:
function onUse(cid, item, frompos, item2, topos)

	playerpos = {x=[COLOR="Red"]0000[/COLOR], y=[COLOR="Red"]0000[/COLOR], z=[COLOR="Red"]0[/COLOR], stackpos=253}  [COLOR="Navy"]--Pos of there the player should stand[/COLOR]
    player = getThingfromPos(playerpos)
	nplayerpos = {x=[COLOR="Red"]0000[/COLOR], y=[COLOR="Red"]0000[/COLOR], z=[COLOR="Red"]0[/COLOR]}        [COLOR="Navy"]--The pos the player will be teleported too[/COLOR]
	item = {x=[COLOR="Red"]0000[/COLOR], y=[COLOR="Red"]0000[/COLOR], z=[COLOR="Red"]0[/COLOR], stackpos=1}  [COLOR="Navy"]--the position of payment item[/COLOR]
    getitem = getThingfromPos(item)

[COLOR="Navy"]--Change item.uid "000" to the unid you are using on the switch.
--Change getitem.itemid "000" to the id of item you are going to use[/COLOR]
    if item.uid == [COLOR="Red"]000[/COLOR] and item.itemid == 1945 and getitem.itemid == [COLOR="Red"]000 [/COLOR]and player.itemid > 0 then
        doRemoveItem(getitem.uid,1)
    doTeleportThing(player.uid,nplayerpos)
        doTransformItem(item.uid,item.itemid+1)
    elseif item.uid == [COLOR="Red"]000 [/COLOR]and item.itemid == 1946 then	
        doTransformItem(item.uid,item.itemid-1)        
    else
        doPlayerSendCancel(cid,"[COLOR="Red"]Where is the item?[/COLOR]")
    end

    return 1
end

//////////////////////


4: Vocation Door

You can only pass this door if you have the needed vocation
Code:
<action uniqueid="[COLOR="Red"]000[/COLOR]" script="vocation door.lua" />
Code:
function onUse(cid, item, frompos, item2, topos)

if item.uid == [COLOR="Red"]000 [/COLOR]then
if getPlayerVocation(cid) == [COLOR="Red"]2[/COLOR] then
doPlayerSendTextMessage(cid, 22, "[COLOR="Red"]You May Pass.[/COLOR]")
pos = getPlayerPosition(cid)

if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.y - 1
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x + 1
else
pos.x = topos.x - 1
end
else
doPlayerSendTextMessage(cid,22,'[COLOR="Red"]Please stand in front of the door.[/COLOR]')
return 1
end

doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'[COLOR="Red"]Only Druids may pass![/COLOR]')
end
return 1
else
return 0
end
end

//////////////////////


5: Switch to remove a wall

Use this switch and you will remove selected wall
Code:
<action uniqueid="[COLOR="Red"]000[/COLOR]" script="wall switch.lua" />
Code:
function onUse(cid, item, frompos, item2, topos)

	wall1 = {x=[COLOR="Red"]0000[/COLOR], y=[COLOR="Red"]0000[/COLOR], z=[COLOR="Red"]0[/COLOR], stackpos=1} [COLOR="Navy"]--Position of the wall/stone[/COLOR]
    getwall1 = getThingfromPos(wall1)

    if item.uid == [COLOR="Red"]000 [/COLOR]and item.itemid == 1945 and getwall.itemid == [COLOR="Red"]000 [/COLOR]then
        doRemoveItem(getwall1.uid,1)
        doTransformItem(item.uid,item.itemid+1)
    elseif item.uid == [COLOR="Red"]000 [/COLOR]and item.itemid == 1946 then
        doCreateItem(000,1,wall1)	
        doTransformItem(item.uid,item.itemid-1)        
    else
        doPlayerSendCancel(cid,"Sorry, not possible")
    end

    return 1
end

//////////////////////



6: Vocation Quest

You can set diffrent loot for diffrent vocation. (With this one you'll loot the reward in a bag.)
Code:
<action uniqueid="[COLOR="Red"]000[/COLOR]" script="vocation quest.lua" />
Code:
function onUse(cid, item, frompos, item2, topos)
	if item.uid == [COLOR="Red"]000 [/COLOR]then 
	queststatus = getPlayerStorageValue(cid,[COLOR="Red"]100[/COLOR])
		   if queststatus == -1 then
		   
		   if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 then --Sorc/Master
		    	doPlayerSendTextMessage(cid,22,"You have found a bag")
container = doPlayerAddItem(cid, 1987, 1)
doAddContainerItem(container, [COLOR="Red"]000[/COLOR], 1)
		    	setPlayerStorageValue(cid,[COLOR="Red"]100[/COLOR],1)
		    
		   elseif getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 then   [COLOR="Navy"]--Druid/Elder[/COLOR]
container = doPlayerAddItem(cid, 1987, 1)
doAddContainerItem(container, [COLOR="Red"]000[/COLOR], 1)
		    	setPlayerStorageValue(cid,[COLOR="Red"]100[/COLOR],1)
			doPlayerSendTextMessage(cid,22,"You have found a bag.")

		    	
		    elseif getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then [COLOR="Navy"]--Paladin/Royal[/COLOR]
container = doPlayerAddItem(cid, 1987, 1)
doAddContainerItem(container, [COLOR="Red"]000[/COLOR], 1)
		    	setPlayerStorageValue(cid,[COLOR="Red"]100[/COLOR],1)
		    	doPlayerSendTextMessage(cid,22,"You have found a bag.")

		    	
		    elseif getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 then   [COLOR="Navy"]--Knight/Elite[/COLOR]
container = doPlayerAddItem(cid, 1987, 1)
doAddContainerItem(container, [COLOR="Red"]000[/COLOR], 1)
			setPlayerStorageValue(cid,[COLOR="Red"]100[/COLOR],1)
			doPlayerSendTextMessage(cid,22,"You have found a bag.")
	
		    	
		   
		else   
		   
		   
	    doPlayerSendTextMessage(cid,22,"It is empty.")
end
end
end
end
//////////////////////



7: Code for loot bag with reward

Then you click on a quest, you will loot a bag with the reward inside the bag.

in your quest script you'll see this somewhere:
Code:
doPlayerAddItem (cid, [COLOR="Red"]000[/COLOR], 1)
remove that and add:
Code:
container = doPlayerAddItem(cid, 1987, 1)
doAddContainerItem(container, [COLOR="Red"]000[/COLOR], 1)
and the reward will be inside the bag (id=1987, only modify the "000")

//////////////////////


8: The Annihilator Quest[/B]
Code:
<action uniqueid="5000" script="quest/annihilator.lua" />
<action uniqueid="5001" script="quest/annihilator.lua" />
<action uniqueid="5002" script="quest/annihilator.lua" />
<action uniqueid="5003" script="quest/annihilator.lua" />
<action uniqueid="5004" script="quest/annihilator.lua" />
Code:
 --[COLOR="Red"]5000 [/COLOR]= The switch.
 --[COLOR="Red"]5001 [/COLOR]= Demon Armor chest.
 --[COLOR="Red"]5002 [/COLOR]= Magic Sword chest.
 --[COLOR="Red"]5003 [/COLOR]= Stonecutter Axe chest.
 --[COLOR="Red"]5004 [/COLOR]= Present chest.


function onUse(cid, item, frompos, item2, topos)
if item.uid == [COLOR="Red"]5000 [/COLOR]then
 if item.itemid == 1946 then

 player1pos = {x=[COLOR="Red"]33225[/COLOR], y=[COLOR="Red"]31671[/COLOR], z=[COLOR="Red"]13[/COLOR], stackpos=253}
 player1 = getThingfromPos(player1pos)

 player2pos = {x=[COLOR="Red"]33224[/COLOR], y=[COLOR="Red"]31671[/COLOR], z=[COLOR="Red"]13[/COLOR], stackpos=253}
 player2 = getThingfromPos(player2pos)

 player3pos = {x=[COLOR="Red"]33223[/COLOR], y=[COLOR="Red"]31671[/COLOR], z=[COLOR="Red"]13[/COLOR], stackpos=253}
 player3 = getThingfromPos(player3pos)

 player4pos = {x=[COLOR="Red"]33222[/COLOR], y=[COLOR="Red"]31671[/COLOR], z=[COLOR="Red"]13[/COLOR], stackpos=253}
 player4 = getThingfromPos(player4pos)


	 if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then

  player1level = getPlayerLevel(player1.uid)
  player2level = getPlayerLevel(player2.uid)
  player3level = getPlayerLevel(player3.uid)
  player4level = getPlayerLevel(player4.uid)

  questlevel = [COLOR="Red"]100[/COLOR]

  if player1level >= questlevel and player2level >= questlevel and player3level >= questlevel and player4level >= questlevel then

	  queststatus1 = getPlayerStorageValue(player1.uid,[COLOR="Red"]100[/COLOR])
	  queststatus2 = getPlayerStorageValue(player2.uid,[COLOR="Red"]100[/COLOR])
	  queststatus3 = getPlayerStorageValue(player3.uid,[COLOR="Red"]100[/COLOR])
	  queststatus4 = getPlayerStorageValue(player4.uid,[COLOR="Red"]100[/COLOR])

	  if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
	--if 1==1 then
	demon1pos = {x=[COLOR="Red"]33219[/COLOR], y=[COLOR="Red"]31657[/COLOR], z=[COLOR="Red"]13[/COLOR]}
	demon2pos = {x=[COLOR="Red"]33221[/COLOR], y=[COLOR="Red"]31657[/COLOR], z=[COLOR="Red"]13[/COLOR]}
	demon3pos = {x=[COLOR="Red"]33220[/COLOR], y=[COLOR="Red"]31661[/COLOR], z=[COLOR="Red"]13[/COLOR]}
	demon4pos = {x=[COLOR="Red"]33222[/COLOR], y=[COLOR="Red"]31661[/COLOR], z=[COLOR="Red"]13[/COLOR]}
	demon5pos = {x=[COLOR="Red"]33223[/COLOR], y=[COLOR="Red"]31659[/COLOR], z=[COLOR="Red"]13[/COLOR]}
	demon6pos = {x=[COLOR="Red"]33224[/COLOR], y=[COLOR="Red"]31659[/COLOR], z=[COLOR="Red"]13[/COLOR]}
 
   doSummonCreature("Demon", demon1pos)
   doSummonCreature("Demon", demon2pos)
   doSummonCreature("Demon", demon3pos)
   doSummonCreature("Demon", demon4pos)
   doSummonCreature("Demon", demon5pos)
   doSummonCreature("Demon", demon6pos)

	nplayer1pos = {x=[COLOR="Red"]33222[/COLOR], y=[COLOR="Red"]31659[/COLOR], z=[COLOR="Red"]13[/COLOR]}
	nplayer2pos = {x=[COLOR="Red"]33221[/COLOR], y=[COLOR="Red"]31659[/COLOR], z=[COLOR="Red"]13[/COLOR]}
	nplayer3pos = {x=[COLOR="Red"]33220[/COLOR], y=[COLOR="Red"]31659[/COLOR], z=[COLOR="Red"]13[/COLOR]}
	nplayer4pos = {x=[COLOR="Red"]33219[/COLOR], y=[COLOR="Red"]31659[/COLOR], z=[COLOR="Red"]13[/COLOR]}

   doSendMagicEffect(player1pos,2)
   doSendMagicEffect(player2pos,2)
   doSendMagicEffect(player3pos,2)
   doSendMagicEffect(player4pos,2)

   doTeleportThing(player1.uid,nplayer1pos)
   doTeleportThing(player2.uid,nplayer2pos)
   doTeleportThing(player3.uid,nplayer3pos)
   doTeleportThing(player4.uid,nplayer4pos)

	 doSendMagicEffect(nplayer1pos,10)
	 doSendMagicEffect(nplayer2pos,10)
	 doSendMagicEffect(nplayer3pos,10)
	 doSendMagicEffect(nplayer4pos,10)

	 doTransformItem(item.uid,1945)

	else
	 doPlayerSendCancel(cid,"Someone has already done this quest")
	end
   else
	doPlayerSendCancel(cid,"Your level is too low")
   end
  else
  doPlayerSendCancel(cid,"You need 4 players in your team.")
  end
 end
 if item.itemid == 1945 then
-- Here is the code start:
starting={x=1632, y=423, z=14, stackpos=253}
checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}
ending={x=1638, y=428, z=14, stackpos=253}
players=0
totalmonsters=0
monster = {}
repeat
creature= getThingfromPos(checking)
 if creature.itemid > 0 then
 if getPlayerAccess(creature.uid) == 0 then
 players=players+1
 end
  if getPlayerAccess(creature.uid) ~= 0 and getPlayerAccess(creature.uid) ~= 3 then
 totalmonsters=totalmonsters+1
  monster[totalmonsters]=creature.uid
   end
 end
checking.x=checking.x+1
  if checking.x>ending.x then
  checking.x=starting.x
  checking.y=checking.y+1
 end
until checking.y>ending.y
if players==0 then
trash= {x=1715, y=678, z=5}
current=0
repeat
current=current+1
doTeleportThing(monster[current],trash)
until current>=totalmonsters
doTransformItem(item.uid,1946)
end
-- Here is the end of it

end
end
if item.uid == [COLOR="Red"]5001 [/COLOR]then
 queststatus = getPlayerStorageValue(cid,[COLOR="Red"]100[/COLOR])
 if queststatus == -1 then
  doPlayerSendTextMessage(cid,22,"You have found a demon armor.")
  doPlayerAddItem(cid,2494,1)
  setPlayerStorageValue(cid,[COLOR="Red"]100[/COLOR],1)
 else
  doPlayerSendTextMessage(cid,22,"It is empty.")
 end
end
if item.uid == [COLOR="Red"]5002 [/COLOR]then
 queststatus = getPlayerStorageValue(cid,[COLOR="Red"]100[/COLOR])
 if queststatus ~= 1 then
  doPlayerSendTextMessage(cid,22,"You have found a magic sword.")
  doPlayerAddItem(cid,2400,1)
  setPlayerStorageValue(cid,[COLOR="Red"]100[/COLOR],1)
 else
  doPlayerSendTextMessage(cid,22,"It is empty.")
 end
end
if item.uid == [COLOR="Red"]5003 [/COLOR]then
 queststatus = getPlayerStorageValue(cid,[COLOR="Red"]100[/COLOR])
 if queststatus ~= 1 then
  doPlayerSendTextMessage(cid,22,"You have found a stonecutter axe.")
  doPlayerAddItem(cid,2431,1)
  setPlayerStorageValue(cid,[COLOR="Red"]100[/COLOR],1)
 else
  doPlayerSendTextMessage(cid,22,"It is empty.")
 end
end
if item.uid == [COLOR="Red"]5004 [/COLOR]then
 queststatus = getPlayerStorageValue(cid,[COLOR="Red"]100[/COLOR])
 if queststatus ~= 1 then
  doPlayerSendTextMessage(cid,22,"You have found a present.")
  doPlayerAddItem(cid,2326,1)
  setPlayerStorageValue(cid,[COLOR="Red"]100[/COLOR],1)
 else
  doPlayerSendTextMessage(cid,22,"It is empty.")
 end
 end
 return 1
end
//////////////////////

Reports: Script Errors can be reported here.

Request: Request can be posted here.


Note: Its very possible some of these scripts look familiar to other scripts,, I know I'm not the first to post it.. and there are so many scripts that one or more will probably think I stole them or other <.<



Welcome to put commants/questions/request... =D




Sincerely


RealSoft
 
Last edited:

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Best answers
2
Reaction score
109
@Topic,

Nice that your doing this,
but what if people wanna keep script private?

Do not release plx.. xd
 
OP
RealSoft

RealSoft

Banned User
Joined
Feb 3, 2009
Messages
4,382
Best answers
0
Reaction score
92
Location
There I sleep
I release scripts that I've been working with, and I will decide if I want to release an request...

I mabey not want to release some scripts due to its worth..

but mostly I will release/script anything that is requested.



Sincerely
 
OP
RealSoft

RealSoft

Banned User
Joined
Feb 3, 2009
Messages
4,382
Best answers
0
Reaction score
92
Location
There I sleep
Any request before I leave?

(Going to the Pool-house, or how to spell... with some friends)
 

liandro103

New Member
Joined
May 5, 2008
Messages
53
Best answers
0
Reaction score
0
Are you accepting applications? If you have a challenge for you and edit the post now ... :p
 
OP
RealSoft

RealSoft

Banned User
Joined
Feb 3, 2009
Messages
4,382
Best answers
0
Reaction score
92
Location
There I sleep
I do whatever you find in a OT server.. Xampp.. Sql/Xml webs...


Put your question here ^.^
 

Slain

TrueHavoc.com
Joined
Nov 27, 2008
Messages
2,241
Best answers
0
Reaction score
29
in service of yalahar quest? or inq :D
 

LoLaye

Active Member
Joined
Dec 23, 2008
Messages
3,774
Best answers
1
Reaction score
43
Location
Sweden
Xaroth i need a scripter to my server can you maybe script to me?
im owner of MOJJE.hopto.org
 
OP
RealSoft

RealSoft

Banned User
Joined
Feb 3, 2009
Messages
4,382
Best answers
0
Reaction score
92
Location
There I sleep
in service of yalahar quest? or inq :D
I'm Sorry, I'm not familiar with the new quest's of tibia.. :S

I can make all Quest scripts below 8.0.
All actions scripts below 8.0, and some above..
All Movements below 8.0, and some above.


:S
 
OP
RealSoft

RealSoft

Banned User
Joined
Feb 3, 2009
Messages
4,382
Best answers
0
Reaction score
92
Location
There I sleep
I made a request for a dude PM'ed me... "Vocation quest"


But please don't request by PM... I don't want over filled PM's <.<



Sincerely
 

alramo

New Member
Joined
May 25, 2009
Messages
197
Best answers
0
Reaction score
0
i need inquisition script.....when Annihilon death.....a teleport appears , for a period of time, that teleport is gonna take u to next room....


also...i need a script....for inqui too , that u can enter in X teleport JUST if u entered in Y teleport, at least once.


so requeriments to be able to go into TP X, is that u have entered tp Y at least once

also....the other problem i have is with anihhi......i need a gooooood anihi script

mines dont work 100% , cuz unique id is on switch..i guess thats why

so..if 4 ppls go into the quest, but 2 dies...., just 2 of them finis the quest, but all of them used the switch , so none of them will be able to go into annihi again, and thats wrong! the 2 who died, shoudl be able to go again , also i need them just to take one and only one!!! itemm



using TFS 0.3.4 SPL2
8.42

waiting for ur reply ^.^ thanks
 
OP
RealSoft

RealSoft

Banned User
Joined
Feb 3, 2009
Messages
4,382
Best answers
0
Reaction score
92
Location
There I sleep
i need inquisition script.....when Annihilon death.....a teleport appears , for a period of time, that teleport is gonna take u to next room....


also...i need a script....for inqui too , that u can enter in X teleport JUST if u entered in Y teleport, at least once.


so requeriments to be able to go into TP X, is that u have entered tp Y at least once

also....the other problem i have is with anihhi......i need a gooooood anihi script

mines dont work 100% , cuz unique id is on switch..i guess thats why

so..if 4 ppls go into the quest, but 2 dies...., just 2 of them finis the quest, but all of them used the switch , so none of them will be able to go into annihi again, and thats wrong! the 2 who died, shoudl be able to go again , also i need them just to take one and only one!!! itemm



using TFS 0.3.4 SPL2
8.42

waiting for ur reply ^.^ thanks

The Annihilator Quest have been added to the list..


INQ-Scripts = I am not familliar with INQ and therefor I cannot make a proper script for it..
I have already have an request of INQ,

Sorry.. Hope you'll be happy enough with Annihilator script =)

Feel Free to request anything.. except Inq xD
 

alramo

New Member
Joined
May 25, 2009
Messages
197
Best answers
0
Reaction score
0
i didnt ask inqui script, i asked u a script and told u i would use it for inqui =P


when u kill Annihilon for example (one inqui boss)a teleport appears in the room that gonna take you to the next room

and after 3min, tp leaves.
 
Top