• 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 PK Trophy

Wazzap

Killing Elite
Joined
Jun 15, 2010
Messages
124
Reaction score
4
Location
London / Poland
Data/actions/scripts/pk.lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(fromPosition.x ~= CONTAINER_POSITION) then
doSendMagicEffect(fromPosition, 28)
doSendMagicEffect(fromPosition, 29)
doSendMagicEffect(fromPosition, 30)
doSendMagicEffect(fromPosition, 31)
doSendMagicEffect(fromPosition, 47)
doSendMagicEffect(fromPosition, 48)
doSendMagicEffect(fromPosition, 28)
doSendMagicEffect(fromPosition, 29)
doSendMagicEffect(fromPosition, 30)
doSendMagicEffect(fromPosition, 31)
doSendMagicEffect(fromPosition, 47)
doSendMagicEffect(fromPosition, 28)
doSendMagicEffect(fromPosition, 29)
doSendMagicEffect(fromPosition, 30)
doSendMagicEffect(fromPosition, 31)
doSendMagicEffect(fromPosition, 47)
doSendMagicEffect(fromPosition, 67)
doSendMagicEffect(fromPosition, 61)
end
if(fromPosition.x ~= CONTAINER_POSITION) then
doSendMagicEffect(fromPosition, 28)
doSendMagicEffect(fromPosition, 29)
doSendMagicEffect(fromPosition, 30)
doSendMagicEffect(fromPosition, 31)
doSendMagicEffect(fromPosition, 47)
doSendMagicEffect(fromPosition, 67)
doSendMagicEffect(fromPosition, 13)
doSendMagicEffect(fromPosition, 14)
doSendMagicEffect(fromPosition, 12)
end
doCreatureSay(cid, getCreatureName(cid) .. ' You Are Master Of PK', TALKTYPE_ORANGE_1)
return true
end

Actions.xml:
<action itemid="10130" script="pk.lua"/>
items.xml add:
<item id="10130" article="a" name="PK Trophy">
<attribute key="weight" value="100"/>
<attribute key="Its Trophy For PK Master On World!"/>
 
fucknkidme454.jpg

Pointless, useless, crappy script, isn't it?
 
Ok, I dont know any scripting but I want to learn though, slowly in my own pace.
So I just had an idea how to make this shorter but I dont know if it works, probably it wont work exactly my way but some similar way maybe.

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(fromPosition.x ~= CONTAINER_POSITION) then
doSendMagicEffect(fromPosition, (28,31))
doSendMagicEffect(fromPosition, (47,48))
doSendMagicEffect(fromPosition, 67)
doSendMagicEffect(fromPosition, 61)
end
if(fromPosition.x ~= CONTAINER_POSITION) then
doSendMagicEffect(fromPosition, (28,31))
doSendMagicEffect(fromPosition, 47)
doSendMagicEffect(fromPosition, 67)
doSendMagicEffect(fromPosition, (12,14))
end
doCreatureSay(cid, getCreatureName(cid) .. ' You Are Master Of PK', TALKTYPE_ORANGE_1)
return true
end

As I said, I've never studied scripting, I've only checked through scripts before quite fast so didn't really catch anything there either.
 
For god sake ppls,stop being so god damn fucking mean?Did he say this was going to be a uber script?Noo...And if you don't like it then for god sake don't bother to comment -.-
 
This is good :D script is fine but no pointless ofc its very good on thoose servers as roxor ;) but in your way i use math.random function...

Isin't this better and friendler version for eye? if realy i dunno if it works properly becouse fast wroted and not tested :D

Lua:
local id = {28, 29, 30, 31, 47, 48, 61, 67} -- as i saw this is your favorite effects...

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(fromPosition.x ~= CONTAINER_POSITION) then
	   local randomChance = math.random(1, #id)
	     if(randomChance == 1) then	
		doSendMagicEffect(cid, id[randomChance])
end
                doCreatureSay(cid, getCreatureName(cid) .. ' You Are Master Of PK', TALKTYPE_ORANGE_1)
	return true
end
 
This is good :D script is fine but no pointless ofc its very good on thoose servers as roxor ;) but in your way i use math.random function...

Isin't this better and friendler version for eye? if realy i dunno if it works properly becouse fast wroted and not tested :D

Lua:
local id = {28, 29, 30, 31, 47, 48, 61, 67} -- as i saw this is your favorite effects...

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(fromPosition.x ~= CONTAINER_POSITION) then
	   local randomChance = math.random(1, #id)
	     if(randomChance == 1) then	
		doSendMagicEffect(cid, id[randomChance])
end
                doCreatureSay(cid, getCreatureName(cid) .. ' You Are Master Of PK', TALKTYPE_ORANGE_1)
	return true
end
see now this is a much better one, a random effect rather than spam of every effect lol
 
Back
Top