Jump to content
  • 0

H>Guild Package


GM Winter

Question


  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

hello i would like to put this guild package npc that will check if the player has a guild also checking the base level must be 50 above thank you

 

Quote

//mall01,99,134,5    script    Guild Package NPC    915,{
dali02,64,122,5    script    Guild Package NPC    915,{

set .@frnd2$,strcharinfo(0);
if(##Gpack6 == 1) goto L_AG;
    mes "Hello Would you like to Claim your Guild Package";
    mes "On our Server Let me Give you A Present for Joining and";
    mes "Playing On Our Server We Hope You will enjoy this Present";
    next;
    mes "^FF0000These present are not tradable and not dropable^000000";
    next;
    switch(select("Yes:No")) {
            case 1:

                query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@lip$);    // recruits ip address
                query_sql("SELECT last_ip FROM `guildpack`", .@flip$);    // recruiter ip address and information
                if ( .@lip$ == .@flip$ ) {
                    mes "^616D7EIt seems you already claimed your Guild Package: ^ff0000" + .@flip$ + "^000000. Sorry, but its not allowed.";
                    close;
                }
                query_sql("INSERT INTO `guildpack` VALUES (NULL," + getcharid(3) + ",'" + escape_sql(strcharinfo(0)) + "','" + .@lip$ + "')");
                
                //THIS PART WERE all items they will get
                
                getitem 501,1;
                set ##Gpack6, 1;
                warp "prontera",156,196;
                close;

            case 2:
                mes "^616D7ENevermind~, You can come back again!";
                close;
        }end;

L_AG:
    mes "^616D7EYou Already Given a Package";
    close;
OnInit:
//set .message$, "Claim your Guild Package Here!!     ";
set .message$, "Click my Boobs to Claim your Guild Package!!     ";

while (1) {
    set .message$, delchar(.message$+charat(.message$,0),0);
    delwaitingroom;
    waitingroom .message$, 0;
    sleep 200;
}
}

//==JUST RENAME or PLACE the Map Name here===//

dali02    mapflag    nocommand    99
dali02    mapflag    restricted    6
dali02    mapflag    nosave    SavePoint
dali02    mapflag    nomemo
dali02    mapflag    noreturn
dali02    mapflag    nobranch
dali02    mapflag    noloot
dali02    mapflag    noskill
dali02    mapflag    novending
dali02    mapflag    nowarpto    99

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  177
  • Reputation:   25
  • Joined:  12/24/14
  • Last Seen:  

Spoiler
//mall01,99,134,5    script    Guild Package NPC    915,{

dali02,64,122,5    script    Guild Package NPC    915,{
	set .@frnd2$,strcharinfo(0);
	if (##Gpack6 == 1) goto L_AG;
	if (!getcharid(2)) goto L_NG;
	if (BaseLevel < 50) goto L_NL;
	mes "Hello Would you like to Claim your Guild Package";
	mes "On our Server Let me Give you A Present for Joining and";
	mes "Playing On Our Server We Hope You will enjoy this Present";
	next;
	mes "^FF0000These present are not tradable and not dropable^000000";
	next;
	switch (select("Yes:No")) {
		case 1:
			query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@lip$);		// recruits ip address
			query_sql("SELECT last_ip FROM `guildpack`", .@flip$);						// recruiter ip address and information
			if ( .@lip$ == .@flip$ ) {
				mes "^616D7EIt seems you already claimed your Guild Package: ^ff0000" + .@flip$ + "^000000. Sorry, but its not allowed.";
				close;
			}
			query_sql("INSERT INTO `guildpack` VALUES (NULL," + getcharid(3) + ",'" + escape_sql(strcharinfo(0)) + "','" + .@lip$ + "')");
			// THIS PART WERE all items they will get
			getitem 501,1;
			set ##Gpack6,1;
			warp "prontera",156,196;
			end;
		case 2:
			mes "^616D7ENevermind~, You can come back again!";
			close;
	}
	end;

	L_AG:
		mes "^616D7EYou Already Given a Package";
	end;

	L_NG:
		mes "Sorry, you don't have a guild";
	end;

	L_NL:
		mes "Sorry, you need level 50 or above to use this npc";
		mes "Thank's";
	end;

OnInit:
	//set .message$, "Claim your Guild Package Here!!";
	set .message$, "Click my Boobs to Claim your Guild Package!!";
	while (1) {
		set .message$, delchar(.message$+charat(.message$,0),0);
		delwaitingroom;
		waitingroom .message$, 0;
		sleep 200;
	}
	end;
}


// ==JUST RENAME or PLACE the Map Name here===//
dali02	mapflag	nocommand	99
dali02	mapflag	restricted	6
dali02	mapflag	nosave	SavePoint
dali02	mapflag	nomemo
dali02	mapflag	noreturn
dali02	mapflag	nobranch
dali02	mapflag	noloot
dali02	mapflag	noskill
dali02	mapflag	novending
dali02	mapflag	nowarpto	99

 

 

Edited by mR L
  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...