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

Action Pioson arrow script, improved (from scratch)

Nirer

New Member
Joined
Aug 23, 2007
Messages
91
Reaction score
0
Location
Israel, How Unfortunate
Hi guys, This is Nirer/Kakashi~Sensei..
Anyways a long time ago I've created a poison-arrow script.. remember?
Well, now I've renewed it (from scratch) since I didn't mess around with Lua for a shit long time... Anyways hope you like it..
Basiclly what it does is:
You take a vial of slime (poison) pour it on arrows and POOF, they turn into poison arrows (at a mana cost of course)..
I've created a youtube movie of the script.. got deleted.. fucking idiots.. ill create another one!

BTW THIS HAS ONLY BEEN TESTED ON TFS!

First step:
Go in to your server directory, then data\actions\scripts\other..
create a new lua file named "poison arrow" (without quotes)
and copy this inside:
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	  if(itemEx.itemid==2544 and item.type==4) then
	    local cost_of_each_arrow_in_mana=3
	    local num_of_arrows=itemEx.type
		local mana_needed=num_of_arrows*cost_of_each_arrow_in_mana
		if(getPlayerMana(cid)>=mana_needed) then
	     doTransformItem(itemEx.uid, 2545)
	      doSendMagicEffect(toPosition, 20)
		   doPlayerAddMana(cid, -mana_needed)
   		    doTransformItem(item.uid, 2006, none)
		else
           		doPlayerSendDefaultCancel(cid, 36)
				 doSendMagicEffect(getPlayerPosition(cid), 2)
		end	
   end 
	return TRUE
end
like so:
2j2agq9.png


Second step:
go to your \data\actions folder, open actions.xml
and add:
PHP:
<action itemid="2006" script="other/poison arrow.lua"/>

like so:
2l97bsy.png


now..
~YOU'RE DONE!~
GRATZ!
I'm new to lua... don't give me that "this script sux" shit.. If you think its not usefull, dont use it...
If you have any trouble, PM me...
NIRER/KAKASHI~SENSEI OUT!
 
Looks good, but I don't think you need the images..
 
Back
Top