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

Thread vandalized, please read all or DONT POST.

Status
Not open for further replies.

Taurus

Texass
Joined
Jan 11, 2009
Messages
616
Solutions
2
Reaction score
30
Location
United States
Thread removed. OtLand can be so terrible sometimes.

You people are children, thanks to the one who tried to help me. I will start the thread again, hopefully no more vandals show up.

The thread went like this:

I asked for help
Someone posted JUNK
I asked them please not to try and raise their post count on my thread.
Someone ELSE jumped in without reading and messed up my thread.
That person then read my thread, decided I was RIGHT and tried to help.
I had given up, show up later their help doesn't work.
update and bump post and now it starts again with people who didn't read the thread!

FORGET IT.

I'd be better off with this file in the recycle bin than on OTLand.

Really, sometimes I wonder how in the heck anyone gets anything done with these little kids out to get the highest post count, and NO MODERATORS to help when they RUIN A PERFECTLY VALID THREAD.
 
Last edited:
you can add a voc check if player is voc 4 and 8 then set condition magic to 5? 4? 3? and if voc is 1,2,35,6,7 then set condition magic to 15
 
Thats exactly what I am asking for help with :)

I am not great at LUA syntax, I do well modifying scripts, but not this far.

I understand it will need to check for voc, can someone please help me with THAT particular function...

Not to be rude, but you must have understood, I know what needs to be done, I just don't know how to do it. I think it's really neat how you find a nice way to raise your post count by going and repeating everyone's question for them. I really think someone should check your posts out and delete all this nonsense like you posted above.

What you said is a part of my post... jerk, thanks for wasting my time, and shutting down my thread for people who might ACTUALLY help.
 
Last edited:
Wow, you sure know how to be thankful when someone helps you out. What he said will fix most of what you asked for in your post. I don't know what your deal is. when you come here asking for help, and someone tries to help you, you don't call them a jerk. Even if they didn't do what you asked or do EVERYTHING you asked. That is just rude. And after what you posted, I don't know if ANYONE will want to help you. Actually, I don't think you are even looking for help. I think you are looking for someone to do the script for you, which is a no no... You need to put the effort into trying to create one or modify one, and if you have problems with it, then post your script here and someone might tell you what you are doing wrong.

Be nice and people might help you out more.

As for the topic at hand... just make a script (Look at other scripts and see how to start one)

Then set your conditions like he said...

As for different effects, please be more specific as what you are looking for.

Maybe instead of working based on the script you have, clearify EXACTLY what you are looking for and that might be more informative to us, and we might be able to help you out more.

Edit: And the script you have there is a script for a player getting high while smoking weed. The item weed will increase their skills faster. So if a player was high and training, their skills would increase faster than normal players.
 
From my original post

I was wondering if someone could show me how to give a different effect based on vocation.

I appreciate any help you can give in rewriting this as I have never really seen a script structured like it. (it is very optimized and hard to read)
distance increase to pallys,
weapon increases to knights
magic level increase to sorcs/druids.

It would be very nice if I could choose how much shield skill each would lose.

Thanks again to anyone who can help.

And then this is all he posted...

you can add a voc check if player is voc 4 and 8 then set condition magic to 5? 4? 3? and if voc is 1,2,35,6,7 then set condition magic to 15

Does any of this look like new information? Does any of it address my original post? Does he even sound like he knows what he is talking about? Look at the things I highlighted... He's just rattling off first day LUA/XML info.

Everyone knows what vocation id we need to use for which vocation, everyone knows what scripts consist of...

I made it clear in my first post this script is structured in a way I haven't seen... Perhaps I was harsh calling him a jerk, he was probably only trying to show off by posting nonsense and running me in circles.

Now look at the help you offered.

...What he said will fix most of what you asked for in your post...
...I don't think you are even looking for help...
...I think you are looking for someone to do the script for you...no no...
put the effort into trying to create one or modify one, and if you have problems with it, then post your script here and someone might tell you what you are doing wrong...

...just make a script ..

..Then set your conditions like he said...

... be more specific ...
I was very specific.

I am the one who modified the script this far...

I am willing to move further if anyone has anything to say about the LUA SYNTAX REGARDING THE SCRIPT. Not the vocation id associated with each class...

But you are certainly right... It is very unlikely that anyone will read beyond the nonsense posted above and see that I am very serious and that I will be very grateful for any educated help that a competent scripter can offer.

Please understand I am not unpleasant, I just see through this little kid trying to show off and raise his post count. I hope now that I have broken down the context of the conversation so far you will see how I arrived at my conclusion, why I have every right to post this here, and why someone who knows what they are doing should consider helping me if it suits their interest.

Thanks to anyone who had the time to read this far.
 
Last edited:
Ok then, Could you tell me exactly what you would like done. Give me a little about what you are trying to do, and what you would like the script you have to do. As far as I see, there shouldn't be any errors with the script.

If all you want to do is have the item affect different vocations differently then try this...

Code:
local condition = createConditionObject(CONDITION_ATTRIBUTES)
 
setConditionParam(condition, CONDITION_PARAM_TICKS, 2 * 60 * 1000) -- 2 minutes

function getPlayerVocation(cid)
	if(getPlayerVocation(cid) == **KNIGHT**) then
		condition = createConditionObject(CONDITION_ATTRIBUTES)
		setConditionParam(condition, CONDITION_PARAM_TICKS, 2 * 60 * 1000) -- 2 minutes
		setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, 35)
		setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, 35)
		setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, 35)
		setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -20)
		else if(getPlayerVocation(cid) == **PALADIN**)then
			condition = createConditionObject(CONDITION_ATTRIBUTES)
			setConditionParam(condition, CONDITION_PARAM_TICKS, 2 * 60 * 1000) -- 2 minutes
			setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, 35)
			setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -20)
			else if(getPlayerVocation(cid) == **SORC/DRUID**) then
				condition = createConditionObject(CONDITION_ATTRIBUTES)
				setConditionParam(condition, CONDITION_PARAM_TICKS, 2 * 60 * 1000) -- 2 minutes
				setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, 15)
	end
 

 
 
 
Weed_Text = {{"F**k,", "Im high!"},{"*cough*", "*cough*"},{"Smoke Bud", "Ere day."},{"Shit-", "make my...", "head hot!"},{"*cough*", "*cough*"},{"*hack*", "*cough*"},{"420", "24/7", "365"},{"Smokin", "Smokin", "boogie", "tonight", "and just", "keep on", "tokin", "yeeaaah"},{"420", "24/7", "365"}}
function AnimTexter(parameters)
     doSendAnimatedText(parameters.pos,parameters.text,parameters.color)
     delay10 = delay10+400
end
 
 
 
function onUse(cid,item,frompos,item2,topos)
     local playerpos = getPlayerPosition(cid)
     local color = {}
     local Weed_Text_Div = {}
     delay10 = 0
     local random_number = math.random(1,table.getn(Weed_Text))
     Weed_Text_Div = Weed_Text[random_number]
     if(getPlayerItemCount(cid,item.itemid)>= 1) then
           Weedpos = playerpos
     else
           Weedpos = playerpos
     end
     local parameters1 = { pos = Weedpos, text = Weed_Text_Div[1], color = math.random(150,190)}
     local parameters2 = { pos = Weedpos, text = Weed_Text_Div[2], color = math.random(150,190)}
     local parameters3 = { pos = Weedpos, text = Weed_Text_Div[3], color = math.random(150,190)}
     local parameters4 = { pos = Weedpos, text = Weed_Text_Div[4], color = math.random(150,190)}
     local parameters5 = { pos = Weedpos, text = Weed_Text_Div[5], color = math.random(150,190)}
     local parameters6 = { pos = Weedpos, text = Weed_Text_Div[6], color = math.random(150,190)}
     local parameters7 = { pos = Weedpos, text = Weed_Text_Div[7], color = math.random(150,190)}
     local parameters8 = { pos = Weedpos, text = Weed_Text_Div[8], color = math.random(150,190)}
     local parameters9 = { pos = Weedpos, text = Weed_Text_Div[9], color = math.random(150,190)}
     addEvent(AnimTexter,400,parameters1)
     addEvent(AnimTexter,1000,parameters2)
     addEvent(AnimTexter,1700,parameters3)
     addEvent(AnimTexter,2100,parameters4)
     addEvent(AnimTexter,2700,parameters5)
     addEvent(AnimTexter,3600,parameters6)
     addEvent(AnimTexter,4100,parameters7)
     addEvent(AnimTexter,4600,parameters8)
     addEvent(AnimTexter,5000,parameters9)
 
if doTargetCombatCondition(0, cid, condition, CONST_ME_POFF) == LUA_ERROR then
		return 
 
FALSE
 end
if doCreatureSay(cid, "Toke it up!", TALKTYPE_ORANGE_1) then
if math.random(1, 3) == 1 then
doRemoveItem(item.uid,1) 
doCreatureSay(cid, "Its Cashed.", TALKTYPE_ORANGE_1)
end
end
end

I just was thinking about it, and I think I gave you an errored code... try this instead... I am at work so I can't test it out...

Code:
local condition = createConditionObject(CONDITION_ATTRIBUTES)
 
setConditionParam(condition, CONDITION_PARAM_TICKS, 2 * 60 * 1000) -- 2 minutes

 
Weed_Text = {{"F**k,", "Im high!"},{"*cough*", "*cough*"},{"Smoke Bud", "Ere day."},{"Shit-", "make my...", "head hot!"},{"*cough*", "*cough*"},{"*hack*", "*cough*"},{"420", "24/7", "365"},{"Smokin", "Smokin", "boogie", "tonight", "and just", "keep on", "tokin", "yeeaaah"},{"420", "24/7", "365"}}
function AnimTexter(parameters)
     doSendAnimatedText(parameters.pos,parameters.text,parameters.color)
     delay10 = delay10+400
end
 
 
 
function onUse(cid,item,frompos,item2,topos)
     local playerpos = getPlayerPosition(cid)
     local color = {}
     local Weed_Text_Div = {}
     local voc = getPlayerVocation(cid)
     delay10 = 0
     local random_number = math.random(1,table.getn(Weed_Text))
	if(voc == **KNIGHT**) then
		condition = createConditionObject(CONDITION_ATTRIBUTES)
		setConditionParam(condition, CONDITION_PARAM_TICKS, 2 * 60 * 1000) -- 2 minutes
		setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, 35)
		setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, 35)
		setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, 35)
		setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -20)
		else if(voc == **PALADIN**)then
			condition = createConditionObject(CONDITION_ATTRIBUTES)
			setConditionParam(condition, CONDITION_PARAM_TICKS, 2 * 60 * 1000) -- 2 minutes
			setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, 35)
			setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -20)
			else if(voc == **SORC/DRUID**) then
				condition = createConditionObject(CONDITION_ATTRIBUTES)
				setConditionParam(condition, CONDITION_PARAM_TICKS, 2 * 60 * 1000) -- 2 minutes
				setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, 15)
	end
     Weed_Text_Div = Weed_Text[random_number]
     if(getPlayerItemCount(cid,item.itemid)>= 1) then
           Weedpos = playerpos
     else
           Weedpos = playerpos
     end
     local parameters1 = { pos = Weedpos, text = Weed_Text_Div[1], color = math.random(150,190)}
     local parameters2 = { pos = Weedpos, text = Weed_Text_Div[2], color = math.random(150,190)}
     local parameters3 = { pos = Weedpos, text = Weed_Text_Div[3], color = math.random(150,190)}
     local parameters4 = { pos = Weedpos, text = Weed_Text_Div[4], color = math.random(150,190)}
     local parameters5 = { pos = Weedpos, text = Weed_Text_Div[5], color = math.random(150,190)}
     local parameters6 = { pos = Weedpos, text = Weed_Text_Div[6], color = math.random(150,190)}
     local parameters7 = { pos = Weedpos, text = Weed_Text_Div[7], color = math.random(150,190)}
     local parameters8 = { pos = Weedpos, text = Weed_Text_Div[8], color = math.random(150,190)}
     local parameters9 = { pos = Weedpos, text = Weed_Text_Div[9], color = math.random(150,190)}
     addEvent(AnimTexter,400,parameters1)
     addEvent(AnimTexter,1000,parameters2)
     addEvent(AnimTexter,1700,parameters3)
     addEvent(AnimTexter,2100,parameters4)
     addEvent(AnimTexter,2700,parameters5)
     addEvent(AnimTexter,3600,parameters6)
     addEvent(AnimTexter,4100,parameters7)
     addEvent(AnimTexter,4600,parameters8)
     addEvent(AnimTexter,5000,parameters9)
 
if doTargetCombatCondition(0, cid, condition, CONST_ME_POFF) == LUA_ERROR then
		return 
 
FALSE
 end
if doCreatureSay(cid, "Toke it up!", TALKTYPE_ORANGE_1) then
if math.random(1, 3) == 1 then
doRemoveItem(item.uid,1) 
doCreatureSay(cid, "Its Cashed.", TALKTYPE_ORANGE_1)
end
end
end

BE SURE TO CHANGE THE VOCATIONS TO THE CORRECT VOC ID... WHERE IT SAYS **KNIGHT** YOU NEED TO CHANGE THAT INCLUDING THE ** TO THE VOCATION IDS SEPERATED BY COMMAS
 
Last edited by a moderator:
I had all but given up on this thread, sorry for my late reply.

I tested the script, it was not working at first. I had it working for those without promo, but now it wont work for anyone.

I have rewritten it a little.
Lua:
local condition = createConditionObject(CONDITION_ATTRIBUTES)
 
setConditionParam(condition, CONDITION_PARAM_TICKS, 2 * 60 * 1000) -- 2 minutes

 
Weed_Text = {{"F**k,", "Im high!"},{"*cough*", "*cough*"},{"Smoke Bud", "Ere day."},{"Shit-", "make my...", "head hot!"},{"*cough*", "*cough*"},{"*hack*", "*cough*"},{"420", "24/7", "365"},{"Smokin", "Smokin", "boogie", "tonight", "and just", "keep on", "tokin", "yeeaaah"},{"420", "24/7", "365"}}
function AnimTexter(parameters)
     doSendAnimatedText(parameters.pos,parameters.text,parameters.color)
     delay10 = delay10+400
end
 
 
 
function onUse(cid,item,frompos,item2,topos)
     local playerpos = getPlayerPosition(cid)
     local color = {}
     local Weed_Text_Div = {}
     local voc = getPlayerVocation(cid)
     delay10 = 0
     local random_number = math.random(1,table.getn(Weed_Text))
	if(voc == 4) then
		condition = createConditionObject(CONDITION_ATTRIBUTES)
		setConditionParam(condition, CONDITION_PARAM_TICKS, 50 * 1000) -- 2 minutes
		setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, 30)
		setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, 30)
		setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, 30)
		setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -30)
		else if(voc == 3)then
			condition = createConditionObject(CONDITION_ATTRIBUTES)
			setConditionParam(condition, CONDITION_PARAM_TICKS, 50 * 1000) -- 2 minutes
			setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, 30)
			setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -30)
			else if(voc == 1)or(voc == 2) then
				condition = createConditionObject(CONDITION_ATTRIBUTES)
				setConditionParam(condition, CONDITION_PARAM_TICKS, 50 * 1000) -- 2 minutes
				setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, 20)
				setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -10)
			end
	end
     Weed_Text_Div = Weed_Text[random_number]
     if(getPlayerItemCount(cid,item.itemid)>= 1) then
           Weedpos = playerpos
     else
           Weedpos = playerpos
     end
     local parameters1 = { pos = Weedpos, text = Weed_Text_Div[1], color = math.random(150,190)}
     local parameters2 = { pos = Weedpos, text = Weed_Text_Div[2], color = math.random(150,190)}
     local parameters3 = { pos = Weedpos, text = Weed_Text_Div[3], color = math.random(150,190)}
     local parameters4 = { pos = Weedpos, text = Weed_Text_Div[4], color = math.random(150,190)}
     local parameters5 = { pos = Weedpos, text = Weed_Text_Div[5], color = math.random(150,190)}
     local parameters6 = { pos = Weedpos, text = Weed_Text_Div[6], color = math.random(150,190)}
     local parameters7 = { pos = Weedpos, text = Weed_Text_Div[7], color = math.random(150,190)}
     local parameters8 = { pos = Weedpos, text = Weed_Text_Div[8], color = math.random(150,190)}
     local parameters9 = { pos = Weedpos, text = Weed_Text_Div[9], color = math.random(150,190)}
     addEvent(AnimTexter,400,parameters1)
     addEvent(AnimTexter,1000,parameters2)
     addEvent(AnimTexter,1700,parameters3)
     addEvent(AnimTexter,2100,parameters4)
     addEvent(AnimTexter,2700,parameters5)
     addEvent(AnimTexter,3600,parameters6)
     addEvent(AnimTexter,4100,parameters7)
     addEvent(AnimTexter,4600,parameters8)
     addEvent(AnimTexter,5000,parameters9)
 
if doTargetCombatCondition(0, cid, condition, CONST_ME_POFF) == LUA_ERROR then
		return 
 
FALSE
 end
if doCreatureSay(cid, "Toke it up!", TALKTYPE_ORANGE_1) then
if math.random(1, 3) == 1 then
doRemoveItem(item.uid,1) 
doCreatureSay(cid, "Its Cashed.", TALKTYPE_ORANGE_1)
end
end
end
end

any help would be appreciated. It does the text and effects, but gives no skill attributes.
 
Bump, Can anyone with a keener scripting eye tell me what is up with the script in my previous post?

I appreciate any help.
 
Last edited:
Bumping again, I know it's a syntax problem. I can't seem to write it properly, any way that I know of.

Thanks to anyone who gives it a try.
 
I'm closing this, too much stupid posts..

but I'm not heartless either, try this:
Code:
local condition = createConditionObject(CONDITION_ATTRIBUTES)setConditionParam(condition, CONDITION_PARAM_TICKS, 2 * 60 * 1000) -- 2 minutes
local Weed_Text = {{"F**k,", "Im high!"},{"*cough*", "*cough*"},{"Smoke Bud", "Ere day."},{"Shit-", "make my...", "head hot!"},{"*cough*", "*cough*"},{"*hack*", "*cough*"},{"420", "24/7", "365"},{"Smokin", "Smokin", "boogie", "tonight", "and just", "keep on", "tokin", "yeeaaah"},{"420", "24/7", "365"}}


function AnimTexter(parameters)
	doSendAnimatedText(parameters.pos,parameters.text,parameters.color)
	delay10 = delay10+400
end


function onUse(cid,item,frompos,item2,topos)
	local playerpos = getPlayerPosition(cid)
	local color = {}
	local Weed_Text_Div = {}
	local voc = getPlayerVocation(cid)
	delay10 = 0
	local random_number = math.random(1,table.getn(Weed_Text))
	if voc == 4 or voc == 8 then
		setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, 30)
		setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, 30)
		setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, 30)
		setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -30)
		else if voc == 3 or voc == 7 then
			setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, 30)
			setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -30)
			else if voc <= 2 or voc == 5 or voc == 6 then
				setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, 20)
				setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -10)
			end
		end
	end
	Weed_Text_Div = Weed_Text[random_number]
	if(getPlayerItemCount(cid,item.itemid)>= 1) then
		Weedpos = playerpos
	else
		Weedpos = playerpos
	end
	local parameters1 = { pos = Weedpos, text = Weed_Text_Div[1], color = math.random(150,190)}
	local parameters2 = { pos = Weedpos, text = Weed_Text_Div[2], color = math.random(150,190)}
	local parameters3 = { pos = Weedpos, text = Weed_Text_Div[3], color = math.random(150,190)}
	local parameters4 = { pos = Weedpos, text = Weed_Text_Div[4], color = math.random(150,190)}
	local parameters5 = { pos = Weedpos, text = Weed_Text_Div[5], color = math.random(150,190)}
	local parameters6 = { pos = Weedpos, text = Weed_Text_Div[6], color = math.random(150,190)}
	local parameters7 = { pos = Weedpos, text = Weed_Text_Div[7], color = math.random(150,190)}
	local parameters8 = { pos = Weedpos, text = Weed_Text_Div[8], color = math.random(150,190)}
	local parameters9 = { pos = Weedpos, text = Weed_Text_Div[9], color = math.random(150,190)}
	addEvent(AnimTexter,400,parameters1)
	addEvent(AnimTexter,1000,parameters2)
	addEvent(AnimTexter,1700,parameters3)
	addEvent(AnimTexter,2100,parameters4)
	addEvent(AnimTexter,2700,parameters5)
	addEvent(AnimTexter,3600,parameters6)
	addEvent(AnimTexter,4100,parameters7)
	addEvent(AnimTexter,4600,parameters8)
	addEvent(AnimTexter,5000,parameters9)
	if doTargetCombatCondition(0, cid, condition, CONST_ME_POFF) == LUA_ERROR then
		return FALSE
	end
	if doCreatureSay(cid, "Toke it up!", TALKTYPE_ORANGE_1) then
		if math.random(1, 3) == 1 then
			doRemoveItem(item.uid,1) 
			doCreatureSay(cid, "Its Cashed.", TALKTYPE_ORANGE_1)
		end
	end
end

if it doesnt work or you need further help with it, feel free to PM me :)
 
Status
Not open for further replies.
Back
Top