Jump to content

Utility: Guild Pack Giver


ShogS

Recommended Posts


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  91
  • Reputation:   8
  • Joined:  03/03/12
  • Last Seen:  

File Name: Guild Pack Giver

File Submitter: ShogS

File Submitted: 05 Sep 2012

File Category: Utilities

Content Author: ShogS

This NPC will Give a Package for each Guild Member take Note: this NPC will record each player IP address to avoid abuse on players side by getting 2 Package in 1 IP.

Click here to download this file

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  177
  • Reputation:   9
  • Joined:  06/25/12
  • Last Seen:  

Hey bro is it possible that the npc will check if the player has a guild or not?

Edited by Qube Eks
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  91
  • Reputation:   8
  • Joined:  03/03/12
  • Last Seen:  

Hey bro is it possible that the npc will check if the player has a guild or not?

No sir. all you need to do is to recall the guild who needs a Package. and the only person who can do that in that map is the Admin only. so first if you required a Guild should consist 10+ members so you need to count them first before recalling them.

Suggestions are appreciated. for Script Updates /heh

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Try using this to check if character has a guild.

set .@GID,getcharid(2);
if (.@GID <= 0) {
mes "You have no guild!";
close;
}

Edited by darristan
Link to comment
Share on other sites

  • 4 weeks later...

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  73
  • Reputation:   2
  • Joined:  12/19/11
  • Last Seen:  

thanks darristan. that works!

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  361
  • Reputation:   10
  • Joined:  12/30/11
  • Last Seen:  

so is this already fixed? i mean revised?

Link to comment
Share on other sites

  • 4 months later...

  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  925
  • Reputation:   32
  • Joined:  12/05/11
  • Last Seen:  

thanks darristan. that works!

sir can post full script here?

Link to comment
Share on other sites

  • 4 weeks later...

  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  170
  • Reputation:   1
  • Joined:  03/26/13
  • Last Seen:  

How to make this per account not per IP

//Script Name: Guild Package NPC Giver
//Developer: ShogS
//Description:  This NPC will Give a Package for each Guild Member take Note: this NPC will record each player IP address to avoid abuse on players side by getting 2 Package in 1 IP
//Version: 1.0
//Some Explanation: Do not forget to set the items to a not tradeable Sample: 17638,91,99 = Can not be droped,sell,trade

//======================================================================================================
// - SQL TABLE
/*
CREATE TABLE IF NOT EXISTS `guildpack` (
  `id` int(11) NOT NULL auto_increment,
  `account_id` int(11) NOT NULL default '0',
  `name` varchar(23) NOT NULL default '',
  `last_ip` varchar(100) NOT NULL default '',
  PRIMARY KEY (`account_id`),
  KEY (`id`)
) ENGINE=MyISAM;
*/
//======================================================================================================

map,x,x,x	script	GPack NPC	x,{

set .@frnd2$,strcharinfo(0);
if(##Gpack == 1) goto L_AG;
	mes "Hello There it seems you are belong to a Guild";
	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 "These present are not tradable and not dropable";
	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 and your Guild Mates are from IP Address: ^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

				getitem2 17638,1,1,8,0,0,0,0,0;
				getitem2 17639,1,1,8,0,0,0,0,0;
				getitem2 17640,1,1,8,0,0,0,0,0;
				getitem 17641,1;
				getitem2 17642,1,1,8,0,0,0,0,0;
				getitem 2449,1;
				getitem 17620,5;
				getitem 12202,20;
				getitem 12203,20;
				getitem 12204,20;
				getitem 12206,20;
				getitem 12207,20;
				set ##Gpack, 1;
				warp "prontera",157,157;
				close;

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

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

}

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

mapname	mapflag	nocommand	99
mapname	mapflag	restricted	6
mapname	mapflag	nosave	SavePoint
mapname	mapflag	nomemo
mapname	mapflag	noreturn
mapname	mapflag	nobranch
mapname	mapflag	noloot
mapname	mapflag	noskill
mapname	mapflag	novending
mapname	mapflag	nowarpto	99
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  182
  • Reputation:   36
  • Joined:  01/26/12
  • Last Seen:  

How to make this per account not per IP

//Script Name: Guild Package NPC Giver
//Developer: ShogS
//Description:  This NPC will Give a Package for each Guild Member take Note: this NPC will record each player IP address to avoid abuse on players side by getting 2 Package in 1 IP
//Version: 1.0
//Some Explanation: Do not forget to set the items to a not tradeable Sample: 17638,91,99 = Can not be droped,sell,trade

//======================================================================================================
// - SQL TABLE
/*
CREATE TABLE IF NOT EXISTS `guildpack` (
  `id` int(11) NOT NULL auto_increment,
  `account_id` int(11) NOT NULL default '0',
  `name` varchar(23) NOT NULL default '',
  `last_ip` varchar(100) NOT NULL default '',
  PRIMARY KEY (`account_id`),
  KEY (`id`)
) ENGINE=MyISAM;
*/
//======================================================================================================

map,x,x,x	script	GPack NPC	x,{

set .@frnd2$,strcharinfo(0);
if(##Gpack == 1) goto L_AG;
	mes "Hello There it seems you are belong to a Guild";
	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 "These present are not tradable and not dropable";
	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 and your Guild Mates are from IP Address: ^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

				getitem2 17638,1,1,8,0,0,0,0,0;
				getitem2 17639,1,1,8,0,0,0,0,0;
				getitem2 17640,1,1,8,0,0,0,0,0;
				getitem 17641,1;
				getitem2 17642,1,1,8,0,0,0,0,0;
				getitem 2449,1;
				getitem 17620,5;
				getitem 12202,20;
				getitem 12203,20;
				getitem 12204,20;
				getitem 12206,20;
				getitem 12207,20;
				set ##Gpack, 1;
				warp "prontera",157,157;
				close;

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

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

}

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

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

 

By quickly revising the script, I think you're good to go if you just don't install that SQL table and comment (or delete) anything from the first to the last SQL query. I mean, you have to comment/delete those lines:

 


				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 and your Guild Mates are from IP Address: ^ff0000" + .@flip$ + "^000000. Sorry, but its not allowed.";
					close;
				}
				query_sql("INSERT INTO `guildpack` VALUES (NULL," + getcharid(3) + ",'" + escape_sql(strcharinfo(0)) + "','" + .@lip$ + "')");

Didn't test it though, but should work.

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

Hi there shogs...I tried already this script but it doesn't read the IP of the player its just reading the account..Can you please give me some Scripts that it can read the IP? and it can read if they have a guild or not..thanks

Link to comment
Share on other sites

  • 3 months later...

  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  134
  • Reputation:   4
  • Joined:  09/28/12
  • Last Seen:  

Hi there shogs...I tried already this script but it doesn't read the IP of the player its just reading the account..Can you please give me some Scripts that it can read the IP? and it can read if they have a guild or not..thanks

Hi all

 

Any solution about this script? I got a same problem.

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
Reply to this topic...

×   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...