how to make boni of item with quest-mysql extension?

12/07/2013 12:36 Laben#1
how to make boni of item with quest-mysql extension?

and is there any share quest or example?

so example i want make this item as with boni and stones with quest:

[Only registered and activated users can see links. Click Here To Register...]

so i search for how to?
12/07/2013 13:33 .HC'Destrox#2
You can't do this with a mysql extension. You need the quest function "item.set_attr" (only exists in 34k and is named "item.set_value").
Example for 34k game:
Code:
item.set_value(0, apply.MAX_HP, 1000)
-> set bonus on index 0 (1. attr) to max_hp with value 1000.

Kind Regards
12/07/2013 13:41 Laben#3
Quote:
Originally Posted by .HC'Destrox View Post
You can't do this with a mysql extension. You need the quest function "item.set_attr" (only exists in 34k and is named "item.set_value").
Example for 34k game:
Code:
item.set_value(0, apply.MAX_HP, 1000)
-> set bonus on index 0 (1. attr) to max_hp with value 1000.

Kind Regards
sure me too i thought thats so item.set_attr but is there any share/public any quests or made quests for thats

because this will be occupation for me

and thanks for reply informations :)
12/07/2013 14:52 .HC'Destrox#4
I can give you an simple example quest:
Code:
quest example_quest begin
	state start begin
		when 11001.chat."Test" begin
			say("Which item slot you want to change (1-90)?")
			local slot_idx = tonumber(input())
			if item.select_cell(slot_idx-1) then
				say("Which attribute index you want to change (1-7)?")
				local attr_index = tonumber(input())
				if attr_index >= 1 and attr_index <= 7 then
					say("Which attribute type you want to set?")
					local attr_type = tonumber(input())
					say("Which attribute value you want to set?")
					local attr_value = tonumber(input())
					item.set_value(attr_index-1, attr_type, attr_value)
					say("The attributes changed.")
				else
					say("Wrong attribute index: "..attr_index)
				end
			else
				say("Could not select slot by index "..slot_idx.."!")
			end
		end
	end
end
Kind Regards
12/07/2013 15:09 Laben#5
Quote:
Originally Posted by .HC'Destrox View Post
I can give you an simple example quest:
Code:
quest example_quest begin
	state start begin
		when 11001.chat."Test" begin
			say("Which item slot you want to change (1-90)?")
			local slot_idx = tonumber(input())
			if item.select_cell(slot_idx-1) then
				say("Which attribute index you want to change (1-7)?")
				local attr_index = tonumber(input())
				if attr_index >= 1 and attr_index <= 7 then
					say("Which attribute type you want to set?")
					local attr_type = tonumber(input())
					say("Which attribute value you want to set?")
					local attr_value = tonumber(input())
					item.set_value(attr_index-1, attr_type, attr_value)
					say("The attributes changed.")
				else
					say("Wrong attribute index: "..attr_index)
				end
			else
				say("Could not select slot by index "..slot_idx.."!")
			end
		end
	end
end
Kind Regards
very well thanks for labor

but my thought is some different maybe

so I thought to example we can do make boni of item with php scripts its right? yes and that item come to in invertory or player store.i want do it with quests :) i think its must be posibble with quest or mysql extension quests?
12/07/2013 15:12 .HC'Destrox#6
I'm not sure i really got it, but this is a quest that changes the attribute of a item in your inventory if you talk to the NPC with vnum 11001 - nothing with php :o

Kind Regards
12/07/2013 15:34 Laben#7
Quote:
Originally Posted by .HC'Destrox View Post
I'm not sure i really got it, but this is a quest that changes the attribute of a item in your inventory if you talk to the NPC with vnum 11001 - nothing with php :o

Kind Regards
then i hope one people will be explain to thats :)

anybody has any idea for thats?
12/07/2013 16:21 .Shōgun#8
You can do it with PHP but only when the item is in safebox. If it's on his inventory you can't change it on the database.
12/07/2013 21:33 Laben#9
Quote:
Originally Posted by .Shōgun View Post
You can do it with PHP but only when the item is in safebox. If it's on his inventory you can't change it on the database.
ah sadly sad event then but i will be still in the quest :)
12/22/2013 00:10 Laben#10
friends what is bonus add "command" like "71051" and "71052" jobs commands its need for me for quest boni

so i want add boni as "71051" and "71052" but with quest

push

push