Register for your free account! | Forgot your password?

You last visited: Today at 12:48

  • Please register to post and access all features, it's quick, easy and FREE!

 

mysql_query and item_proto

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2012
Posts: 113
Received Thanks: 71
mysql_query and item_proto

Hi !
I was making a quest with mysql_query, to conect to refine_vnum in item_proto.

Code:
quest melhorar begin
 state start begin
  when 20091.take with item.vnum() == 169 begin
   local a = select("Sírius", "Barão", "Sair")
   if a == 1 then
    mysql_query("UPDATE player.item_proto SET refine_item='270' WHERE vnum='169'")
   elseif a == 2 then
    mysql_query("UPDATE player.item_proto SET refine_item='260' WHERE vnum='169'")
   end
  end
 end
end
Here is the quest.
But, to save the changes, i have to do /reload p ingame, and, i want that it save the changes without /reload p.
I don't know if it's possible to do it. But, maybe i receive an answer for it.

Sorry for my bad english.
Thank you.

Best Regrards.



Chikyou is offline  
Old   #2
 
elite*gold: 0
Join Date: Oct 2012
Posts: 113
Received Thanks: 71
bump


Chikyou is offline  
Old   #3
 
elite*gold: 0
Join Date: Mar 2012
Posts: 765
Received Thanks: 532
refine_item doesn't exist
I think you mean refined_vnum
©by Noa is offline  
Old   #4
 
elite*gold: 0
Join Date: Oct 2012
Posts: 113
Received Thanks: 71
Quote:
Originally Posted by ©by Noa View Post
refine_item doesn't exist
I think you mean refined_vnum
Yes i know, i just didn't remember the correct name xD

Btw, you know how i should do that? Or anyone else?


Chikyou is offline  
Old   #5
 
elite*gold: 0
Join Date: Mar 2012
Posts: 765
Received Thanks: 532
I dont know what you mean or what you like do.
Change refined_vnum some item with other one or refine it 100%?
©by Noa is offline  
Old   #6
 
elite*gold: 0
Join Date: Oct 2012
Posts: 113
Received Thanks: 71
I want to make 2 refines in one weapon.

Exemple:

Battle Sword (169) -> Sirius sword (279) or Baron sword (269).

Exemple with quest:

Code:
quest test begin
state start begin
when 20091.take with item.vnum() == 169 begin
say("What weapon you want?")
local a = select ("Sirius", "Baron")
I don't know if you understand me, but it's something like that.
Chikyou is offline  
Old   #7
 
elite*gold: 0
Join Date: Mar 2012
Posts: 765
Received Thanks: 532
PHP Code:
when 20091.take with item.vnum() == 169 begin
say
("What weapon you want?")
local a select ("Sirius""Baron")
if 
a==1 then pc.give_item2(279
elseif 
a==2 then pc.give_item2(269
end
end 
©by Noa is offline  
Old   #8
 
elite*gold: 0
Join Date: Oct 2012
Posts: 113
Received Thanks: 71
For example the weapon has placed bonus and the player wants to turn it into another weapon, with the way you said the new weapon would have no bonus, you know?
And I wanted that the new weapon had the bonus that had previous weapon.

Sorry for bad englisht ( Translator english <.< )
Chikyou is offline  
Old   #9
 
elite*gold: 0
Join Date: Oct 2012
Posts: 113
Received Thanks: 71
bump
Chikyou is offline  
Old   #10
 
elite*gold: 0
Join Date: Oct 2012
Posts: 113
Received Thanks: 71
bump
Chikyou is offline  
Old   #11

 
elite*gold: 44
Join Date: May 2010
Posts: 2,053
Received Thanks: 1,742
Updating prototype information (item_proto, mob_proto etc.) in the game core requires the reload p command.
I'm not sure whether GM commands can be called from quests. There is the method cmdchat(), but I guess it only works for sending signals to the client.

There is no explicit reload() method in the quest scope, though.
Mashkin is offline  
Old   #12
 
elite*gold: 120
Join Date: Mar 2009
Posts: 3,409
Received Thanks: 1,740
It's not possible to save it without reload or shutdown.
But you shouldnt use reload, because it could crash some tables.


.Remix is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
Mysql_Query
Hi, ich suche jemanden der mir mysql_query's schreiben kann. Ich würde auch geldlich entlohnen. Skype: samy02091997 MFG DarkNessWorld2
1 Replies - Metin2 PServer - Discussions / Questions
mysql_query hilfe ...
Ich hab ein kleines Problem und zwar möchte Ich meine Dungeon GUI auf MySQL basierend machen allerdings möchte der Befehl nicht so ganz wie ich das...
1 Replies - Metin2 PServer - Discussions / Questions
Syntax Error bei einem Mysql_Query
hat sich erledtigt
1 Replies - Web Development
[Frage]item_proto server in item_proto client umwandeln
Hallo, Wie schon oben erwähnt such ich einen converter oder sonst irgend etwas, mit dem ich meine serverside item_proto und eine client item_proto...
7 Replies - Metin2 PServer - Discussions / Questions



All times are GMT +2. The time now is 12:48.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.