[SERVICE] Die Questerstellung

07/23/2013 17:45 Noa_#361
ein zufälliges item von den id's 10-19
also schwert+0 bis schwert+9
PHP Code:
a={10,11,12,13,14,15,16,17,18,19}
pc.give_item(a[math.random(1,table.getn(a))],1
07/23/2013 17:53 darkfr3ak#362
so ähnlich hab ichs ja... die sache ist nur:

1. sollte das "system" dynamisch sein, heißt, kein vnums in der quest. Die vnums holt sich die quest aus der db

2. ich krieg halt mehr items aus dem "hohen" bereich als aus dem "niedrigen"
07/23/2013 19:00 ProfessorEnte#363
Quote:
Originally Posted by darkfr3ak View Post
so ähnlich hab ichs ja... die sache ist nur:

1. sollte das "system" dynamisch sein, heißt, kein vnums in der quest. Die vnums holt sich die quest aus der db

2. ich krieg halt mehr items aus dem "hohen" bereich als aus dem "niedrigen"
Ist halt "glueck" :-|
Sowas wie Zufall gibts nunmal beim Pc nicht da alles iwie berechnet wird.
[Only registered and activated users can see links. Click Here To Register...]

Koenntest ja mal math.randomseed probieren, das geht nach der Uhrzeit.
[Only registered and activated users can see links. Click Here To Register...]

Koenntest es auch so machen:
PHP Code:
local r math.random(1,10)
if 
== 1 then
    math
.random(16,19)
else
    
math.random(10,15)
end 
Erst schauen ob man ein Wertvolles Item bekommen soll oder ein nicht Wertvolles und dann dazwischen "zufaellig" auswaehlen.
07/23/2013 19:21 darkfr3ak#364
Das werd ich mal probieren :) Vielen Dank schon mal an alle für die Tipps.

//Edit:

Mein Problem ist gelöst, dank der netten Hilfe von euch allen und vorallem durch Sp0ngeb0b ist cool :)
07/26/2013 10:03 Monkey. D. Ruffy.#365
Heyho,

Meine idee ist eim Emblem system das ein Spieler zb 100 Monster der art Tötet dann ein Emblem freischaltet und Dieses dann ingame auswählt und über seinen Kopf hat
07/26/2013 10:12 .Vegas#366
Quote:
Originally Posted by Jahnke² View Post
Heyho,

Meine idee ist eim Emblem system das ein Spieler zb 100 Monster der art Tötet dann ein Emblem freischaltet und Dieses dann ingame auswählt und über seinen Kopf hat
Ist genau das gleiche wie das Prestige System bloß das man da Spieler töten muss.
07/26/2013 15:56 WyppyOne#367
ok how can i make a quest who disconnect you if you aren't premium_user from one ch ... example : exist 2 ch : 1 for normal players and another only for premium_users , if i am premium_user i can go to that ch ( for example ch 2 ) but if i am not premium user i can't go to that ch ( when log in on that ch appear a message box and disconnect me from that ch ) . Sorry for my english
Screen : [Only registered and activated users can see links. Click Here To Register...]

ENG : welcome <player name> on vip channel , unfortunately you are not a vip user , good bye ( disconnect )

The quest for activation premium_user :

quest premium_user begin
state start begin
when login with pc.getqf("premium_user")==1 and not npc.is_pc() begin
end
when 70010.use with pc.getqf("premium_user")==0 begin
say_title("PRO-AREA")
say("")
say("Cu acest obiect iti poti activa gradul de")
say("premium user.")
say("Gradul de premium user va ramane permanent.")
say("Tu poti dispune de lucruri noi si folositoare")
say("daca iti activezi premium user.")
say_title("Esti sigur ca vrei sa fi premium user?")

local s = select("Da", "Nu")

if s == 1 then
pc.remove_item(70010, 1)
pc.setqf("premium_user", 1)

else
return
end
end
end
end
07/27/2013 00:25 √π.#368
^
PHP Code:
quest premium_channel begin
    state start begin
        when login with pc
.get_channel_id()==CH and pc.getf("premium_user""premium_user")==0 begin
            cmdchat
("your client function to log out")
            
say("welcome "..pc.get_name().." on vip channel[ENTER], unfortunately you are not a[ENTER]vip user[ENTER]good bye")
            
say("[DELAY value;20000] [/DELAY]") --10 second delay
        end
    end
end 
You have to add a small function do your client in which you send the command "logout".

An euch anderen, ich bin der Meinung es ginge auch direkt über cmdchat, mir fällt es gerade nur nicht ein. Sollte es jemand wissen darf er mich gerne verbessern.
07/27/2013 01:06 WyppyOne#369
Quote:
Originally Posted by √π. View Post
^
PHP Code:
quest premium_channel begin
    state start begin
        when login with pc
.get_channel_id()==CH and pc.getf("premium_user""premium_user")==0 begin
            cmdchat
("your client function to log out")
            
say("welcome "..pc.get_name().." on vip channel[ENTER], unfortunately you are not a[ENTER]vip user[ENTER]good bye")
            
say("[DELAY value;20000] [/DELAY]") --10 second delay
        end
    end
end 
You have to add a small function do your client in which you send the command "logout".

An euch anderen, ich bin der Meinung es ginge auch direkt über cmdchat, mir fällt es gerade nur nicht ein. Sollte es jemand wissen darf er mich gerne verbessern.
What is that delay ? and that logout command you say to introduc a buton ... i don't know f8 for example and when put that buton to "logout" ? and if that , how can i make the quest to "press" that buton ?
And for example , vip channel is channel 2 ... function will be
pc.get_channel_2() ???? or pc.get_channel_id(2) or pc.get_channel_2

sorry for my english , i hope you understand
07/27/2013 12:48 OliviaIchLiebeDichx3#370
Könnte mir jemand so eine quest machen .
Z.b kill 100 wildhunde und du bekommst eine king für deine klasse .

Wäre echt nett
07/27/2013 13:11 .LuckyStrike#371
Quote:
Originally Posted by OliviaIchLiebeDichx3 View Post
Könnte mir jemand so eine quest machen .
Z.b kill 100 wildhunde und du bekommst eine king für deine klasse .

Wäre echt nett
Die Quest ist nicht Getestet!!
Bei Fehler bitte Posten :D

PHP Code:
quest wildhund begin
    state start begin
        when login begin
            send_letter
("Töte Wildhunde")
        
end
        
        when button 
or info begin
            say_title
("Wildhunde")
            
say("")
            
say("Töte")
            
say("Wildhunde")
            
say("Dann")
            
say("bekommst")
            
say("du")
            
say("eine")
            
say("belohnung")
            
say("")
            
pc.setqf("state1"0
            
q.set_counter("Wildhunde"100
            
set_state(kill)
        
end
    end
    
    state kill begin
        when letter begin
            send_letter
("Wildhunde")
        
end
        
        when button 
or info begin
            say_reward
("Du hast"..pc.getqf("state").." von 100 Getöten.")
        
end
        
        when kill begin
        local count1 
pc.getqf("state1") + 
        
if count <= 100 then 
            pc
.setqf("state1"count1
            
q.set_counter("Wasserdrache"count1
        
end
        
if count <= 100 then
            say
("Glückwunsch")
            
say("du")
            
say("hast")
            
say("es")
            
say("geschafft")
            
say("hier")
            
say("die")
            
say("belohnung")
            if 
pc.get_job() == 0 then
                pc
.give_item2(KRIEGER-KING-VNUM) -- Bin mir nicht sichermusst du gucken
            
elseif pc.get_job() == 1 then
                pc
.give_item2(NINJA-KING-VNUM) -- Bin mir nicht sichermusst du gucken
            
elseif pc.get_job() == 2 then
                pc
.give_item2(SURA-KING-VNUM) -- Bin mir nicht sichermusst du gucken
            
elseif pc.get_job() == 3 then
                pc
.give_item2(SCHAMI-KING-VNUM) -- Bin mir nicht sichermusst du gucken
            end
        end
    end
end 
07/27/2013 13:44 √π.#372
Quote:
Originally Posted by WyppyOne View Post
What is that delay ? and that logout command you say to introduc a buton ... i don't know f8 for example and when put that buton to "logout" ? and if that , how can i make the quest to "press" that buton ?
And for example , vip channel is channel 2 ... function will be
pc.get_channel_2() ???? or pc.get_channel_id(2) or pc.get_channel_2

sorry for my english , i hope you understand
You have to add in your game.py:
in __ServerCommand_Build(self):
Code:
"logout"			: self.__logout_from_server,
and also add the function
Code:
def __logout_from_server(self):
		net.SendChatPacket("/logout")
pc.get_channel_id() returns the channel you are currently logged in, so in your case it will be 2 -> pc.get_channel_id()==2

I have added the delay from 10 seconds because when you type ingame /logout it will count down from max. 10 seconds. If you wouldn't delay the window the player could just stop the countdown.
07/27/2013 15:52 WyppyOne#373
Quote:
Originally Posted by √π. View Post
You have to add in your game.py:
in __ServerCommand_Build(self):
Code:
"logout"			: self.__logout_from_server,
and also add the function
Code:
def __logout_from_server(self):
		net.SendChatPacket("/logout")
pc.get_channel_id() returns the channel you are currently logged in, so in your case it will be 2 -> pc.get_channel_id()==2

I have added the delay from 10 seconds because when you type ingame /logout it will count down from max. 10 seconds. If you wouldn't delay the window the player could just stop the countdown.

I have a problem ... the message box appear but the log out doesn't work ... i have command /logout


Code:
quest premium_channel begin 
    state start begin 
        when login with pc.get_channel_id()==2 and pc.getf("premium_user", "premium_user")==0 begin 
	    cmdchat("/logout")
	    say("welcome "..pc.get_name().." on vip channel[ENTER], unfortunately you are not a[ENTER]vip user[ENTER]good bye") 
            say("[DELAY value;20000] [/DELAY]") --10 second delay 
			 
        end 
    end 
end
07/27/2013 16:27 .Despero™#374
Kann einer Zur Map 1 quest schreiben ?
Das steht in Game.py
PHP Code:
def __warpmap(selfqid):
        
constInfo.warpmapqin int(qid
PHP Code:
"warpmap"                self.__warpmap
07/28/2013 00:07 InfraBlauModus#375
Suche die Metin2.de Quest für das Pferd Steiger´n

Also von 1-10 Die Reitpunkte ab Reiten,
Dann zum KG eine KGQ machen wo der Spieler in einer Gruppe oder alleine Die Wüsten Bogis und Kämpfer töten muss
Dann halt von KG bis MG also 11-20 Die Ganzen Bosse killen muss.

Und für ein MG

200 Dämonen Bogenschützen killen muss wäre sehr dankbar