changename.quest?

03/09/2011 11:13 .Rebel#1
hi i have 2 question get from epvp

1 by hamashi
2 by 2010 serverfiles by daro

PHP Code:
quest changename begin
state start begin
when 71055.
use begin
say_title
("Namensänderung:")
say("")
say("Mithilfe dieses Items kannst du deinen Namen")
say("einmalig ändern, also überlege es dir gut, ob")
say("du deinen Namen wirklich ändern möchtest!")
say("")
say_reward("Möchtest du deinen wirklich Namen ändern?")
say("")
local change select("Ja""Nein")
if 
change == 1 then
say_title
("Namensänderung:")
say("")
say("Also du möchtest wirklich deinen Namen ändern!")
say("Bevor du deinen Namen ändern kannst, müssen wir")
say("erst prüfen ob dieser Name eigentlich noch frei")
say("ist.")
say("")
say_reward("Gib deinen neuen Namen hier ein:")
say("")
local c_name input()
local c_search find_pc_by_name(c_name)

if 
c_search==0 then 
say_title
("Namensänderung:")
say("")
say("Dieser Name ist noch frei. Bist du dir sicher, dass")
say("du dich "..c_name.." nennen möchtest?")
say("")
local secure select("Ja""Nein")
if 
secure == 1 then
say_title
("Namensänderung:")
say("")
say("Herzlichen Glückwunsch!")
say("")
say("Deine Name wurde in "..c_name.." geändert!")
say("")
say_reward("Bitte einmal relog machen, damit die Änderung")
say_reward("gültig wird!")
say("")
pc.change_name(c_name)
pc.remove_item(710551)
else
say_title("Namensänderung:")
say("")
say("Schade, dass du dich doch anders entschieden hast,")
say("aber vielleicht möchtest du deinen Namen ja ein")
say("andermal ändern!")
say("")
end
else
say_title("Namensänderung:")
say("")
say("Dieser Name ist leider schon vergeben, bitte suche")
say("dir einen anderen Namen, den du verwenden kannst!")
say("")
end
else
return
end
end
end
end 
2 quest from 2010 serverfiles

PHP Code:

quest chagne_name begin
    state start begin
        when 71055.
use begin
            
if pc.is_married() then
                say
("You cannot change your name if you are married.")
                
say("")
                return
            
end

            
if pc.is_polymorphed() then
                say
("You cannot change your name if you are transformed.")
                
say("")
                return
            
end

            
if pc.has_guild() then
                say
("You cannot change your name if you are in the guild. ")
                
say("")
                return
            
end

            
if party.is_party() then
                say
("You cannot change your name if you are in group.")
                
say("")
                return
            
end

            
if pc.get_level() < 50 then
                say
("You cannot change your name if your level is not higher than lever 49.")
                
say("")
                return
            
end

            
if get_time() < pc.getqf("next_time"then
                say
("You can not use it now.")
                
say("")

                if 
is_test_server() == true then
                    say
("Since it's test server, you can go")
                    
say("")
                else
                    return
                
end
            end

            say
("Please enter the name you want to have") ;

            
local name pc.name ;
            
local str input() ;

            
local ret pc.change_name(str) ;

            if 
ret == 0 then
                say
("You didn't log in after you have changed your name.")
                
say("please re-log in.")
                
say("")

                
char_log(0"CHANGE_NAME""HAVE NOT RE-LOGIN")
            elseif 
ret == 1 then
                say
("The problem occured while using the item.")
                
say("Please use again.")
                
say("")
                
                
char_log(0"CHANGE_NAME""ITEM USE PROBLEM")
            elseif 
ret == 2 then
                say
("The name is not available.")
                
say("Please enter other name.")
                
say("")

                
char_log(0"CHANGE_NAME""CAN NOT USE NAME")
            elseif 
ret == 3 then
                say
("The name is not available.")
                
say("Please enter other name.")
                
say("")

                
char_log(0"CHANGE_NAME""ALREADY USING NAME")
            elseif 
ret == 4 then
                say
("You have changed your name successfully.")
                
say("Please log in again.")
                
say("")

                
item.remove() ;

                
pc.setqf("next_time"get_time() + time_hour_to_sec(24*15))

                
char_log(0"CHANGE_NAME""SUCCESS: from "..name.." to "..str)
            else
                
say("Unknown error occured.")
                
say(ret)

                
char_log(0"CHANGE_NAME""UNKNOWN NAME")
            
end
        end
    end
end 
i have 2010 serverfiles and the option on the questlib pc.change_name
but no one work when i click on the item 71055 nothing hapen need something?
03/15/2011 07:43 Asparte#2
Try to set antiflag and flag just like in the item 70021.
03/15/2011 10:44 pirulipipi#3
The quest dont work...

2010 files contain a table for quest.

PHP Code:
CREATE TABLE `change_name` (
  `
pidint(10unsigned default NULL,
  `
old_namevarchar(12NOT NULL default 'NONAME',
  `
new_namevarchar(12NOT NULL default 'NONAME',
  `
timedatetime NOT NULL default '0000-00-00 00:00:00',
  `
ipvarchar(16) default '0.0.0.0'
ENGINE=MyISAM DEFAULT CHARSET=latin1

Maybe questlib miss something..
Anyone have the full FIX?
03/22/2011 17:40 .Rebel#4
i think no one have that 100% working
03/22/2011 18:50 D'Arti#5
I think that the quest don´t work on the files from 2010.
You can try it on different 2010 files if it works = yay :D

When the quest works on the other old Files but not on the new is something bugger or something like this.

I hope that i have helped.
Sorry for my bad English D:
04/01/2011 19:30 ѕηαρz уσυ.χ#6
Maybe you just forgot to change "type" of the item to "18" in the database...?
04/02/2011 11:08 .Rebel#7
Quote:
Originally Posted by ѕηαρz уσυ.χ View Post
Maybe you just forgot to change "type" of the item to "18" in the database...?
???
04/03/2011 00:46 RumorUS#8
Quote:
Originally Posted by Lexico View Post
i think no one have that 100% working
I have a friend who had this working 100% (Soulboundmt2)

good luck trying to get him to help you, but I'm sure if he does he knows how..

[Only registered and activated users can see links. Click Here To Register...]
04/05/2011 05:58 .Rebel#9
i have pm hin
04/05/2011 18:54 MBlil#10
You have 2 change the "type" from item "71055"
Open your Navicat (ore what ever) search the Item "71055" and look on the table name "type"
old "type" was "3" change it in "18"
so now can you use the item

Sorry for bad English :p

kind regards MB
04/11/2011 15:27 .Rebel#11
Quote:
Originally Posted by MBlil View Post
You have 2 change the "type" from item "71055"
Open your Navicat (ore what ever) search the Item "71055" and look on the table name "type"
old "type" was "3" change it in "18"
so now can you use the item

Sorry for bad English :p

kind regards MB
DB
71055 type 18

Quest_functions
pc.change_name

i have use the item 71055 the quest work but the char still have the same name dont change the name -.-

[Only registered and activated users can see links. Click Here To Register...]
04/20/2011 21:51 MBlil#12
Free push, cuz got the same problem!
04/21/2011 11:37 Iceman2112#13
Quote:
Originally Posted by pirulipipi View Post
The quest dont work...

2010 files contain a table for quest.

PHP Code:
CREATE TABLE `change_name` (
  `
pidint(10unsigned default NULL,
  `
old_namevarchar(12NOT NULL default 'NONAME',
  `
new_namevarchar(12NOT NULL default 'NONAME',
  `
timedatetime NOT NULL default '0000-00-00 00:00:00',
  `
ipvarchar(16) default '0.0.0.0'
ENGINE=MyISAM DEFAULT CHARSET=latin1

Maybe questlib miss something..
Anyone have the full FIX?
Hi.

This is one of two thinks what u need to work.
The 2nd Think you need is a entry in the File who is called "game".

Sry for my bad English.
04/22/2011 12:45 .Rebel#14
problem solved [Only registered and activated users can see links. Click Here To Register...] can close
07/23/2011 10:47 garos90#15
Hey anyone know how to create a timer quest?( when one mob kill then start count ) ????