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

[Solved]Slingshot script

Pablingas

New Member
Joined
Jul 6, 2009
Messages
52
Reaction score
1
Hey guys
Im trying a slingshot that shoots gold nuggets, in a smallstones effect but the thing is that i dont want my gold nuggets be ammotype=arrow or bolt, because I dont want people using them with bows or crossbows how can I do a script to use only gold nuggets in my slingshot but if it is a bow or xbow dont shoot cause ur not using the correct ammotype, help please rep++ I will appreciate it a lot, or maybe just edit the slingshot to automatically shoot in smallstone effect i dont really need the gold nuggets but IDK please help me

I'm using TFS cryingdamson6pl1, thanks alot
 
Last edited:
Lol, you need only to copy the different between bow and crossbow.

EDIT
The easier way is weapon script editing
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLSTONE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1.3, 1.0, 1.4, 0)
function onUseWeapon(cid, var)
ammo = getPlayerSlotItem(cid, 10)
if ammo.itemid == 2157 and ammo.type >= 1 then
doCombat(cid, combat, var)
doRemoveItem(ammo.uid, 1)
else
return true
end
	return TRUE
end

[Tested on TFS 0.3.6]
 
bro bro idk if i did it right but, my slingshot is shooting spears lol, no the CONST_ANI_SMALLSTONE

why??

maybe just i wrote my code in different places, can someone help me please
 
Just go Items.xml then write <attribute key="attack" value="70" />
<attribute key="weaponType" value="distance" />
<attribute key="shootType" value="smallstone" />
<attribute key="range" value="6" />
<attribute key="breakChance" value="33" />
<attribute key="ammoAction" value="moveback" />
 
Back
Top