donkeyg Posted June 13, 2013 Group: Members Topic Count: 344 Topics Per Day: 0.07 Content Count: 1060 Reputation: 1 Joined: 02/13/12 Last Seen: November 14, 2016 Share Posted June 13, 2013 no mount allowed when equiped *REQUEST*and a NPC that gives 100 coin to every account ( Same IP address cannot get). Quote Link to comment Share on other sites More sharing options...
Jaburak Posted June 13, 2013 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 1125 Reputation: 236 Joined: 07/30/12 Last Seen: April 13 Share Posted June 13, 2013 prontera,150,150,0 script Test 123,{ setarray .671,100; // Rewards: <item id>,<item amount> query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) + "", .@lip$); if ( getd("$" + .@lip$ + "_NG") > 0 || #NewbieGift > 0) { mes .@n$; mes "I'm sorry, the rewards are exclusively for new players."; close; } mes .@n$; mes "Welcome! Here are some free gifts"; mes "for newcomers:"; for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 2 ) mes .@rwd[.@i+1] + " x " + getitemname(.@rwd[.@i]); close2; set #NewbieGift, 1; setd "$" + .@lip$ + "_NG", getd("$" + .@lip$ + "_NG") + 1; for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 2 ) getitem .@rwd[.@i], .@rwd[.@i+1]; end; } Quote Link to comment Share on other sites More sharing options...
Capuche Posted June 13, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted June 13, 2013 // alter table `login` add column `newbie` tinyint(3) unsigned not null default '0', add index (`newbie`); prontera,150,150,0 script Test 123,{ query_sql "select `last_ip`, `newbie` from `login` where `last_ip` in (SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) +") having `newbie` = max(`newbie`) limit 1", .@last_ip$, .@tmp; if ( .@tmp ) { mes "I'm sorry, the rewards are exclusively for new players."; close; } mes "Welcome! Here are some free gifts"; mes "for newcomers:"; for ( set .@i, 0; .@i < getarraysize(.reward); set .@i, .@i + 2 ) mes .reward[.@i+1] + " x " + getitemname(.reward[.@i]); close2; for ( set .@i, 0; .@i < getarraysize(.reward); set .@i, .@i + 2 ) getitem .reward[.@i], .reward[.@i+1]; query_sql "update `login` set `newbie` = 1 WHERE `last_ip`= '" + .@last_ip$ + "'"; end; OnInit: setarray .reward, 671,100; // Rewards: <item id>,<item amount> .size = getarraysize( .reward ); } nb. setarray .671,100; // Rewards: <item id>,<item amount> was wrong Quote Link to comment Share on other sites More sharing options...
donkeyg Posted June 14, 2013 Group: Members Topic Count: 344 Topics Per Day: 0.07 Content Count: 1060 Reputation: 1 Joined: 02/13/12 Last Seen: November 14, 2016 Author Share Posted June 14, 2013 // alter table `login` add column `newbie` tinyint(3) unsigned not null default '0', add index (`newbie`); prontera,150,150,0 script Test 123,{ query_sql "select `last_ip`, `newbie` from `login` where `last_ip` in (SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) +") having `newbie` = max(`newbie`) limit 1", .@last_ip$, .@tmp; if ( .@tmp ) { mes "I'm sorry, the rewards are exclusively for new players."; close; } mes "Welcome! Here are some free gifts"; mes "for newcomers:"; for ( set .@i, 0; .@i < getarraysize(.reward); set .@i, .@i + 2 ) mes .reward[.@i+1] + " x " + getitemname(.reward[.@i]); close2; for ( set .@i, 0; .@i < getarraysize(.reward); set .@i, .@i + 2 ) getitem .reward[.@i], .reward[.@i+1]; query_sql "update `login` set `newbie` = 1 WHERE `last_ip`= '" + .@last_ip$ + "'"; end; OnInit: setarray .reward, 671,100; // Rewards: <item id>,<item amount> .size = getarraysize( .reward ); } nb. setarray .671,100; // Rewards: <item id>,<item amount> was wrong so,, which 1 shud i use? urs or Anakid's? Quote Link to comment Share on other sites More sharing options...
Capuche Posted June 14, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted June 14, 2013 Anakid's script have some error.. but make your choice Quote Link to comment Share on other sites More sharing options...
donkeyg Posted June 16, 2013 Group: Members Topic Count: 344 Topics Per Day: 0.07 Content Count: 1060 Reputation: 1 Joined: 02/13/12 Last Seen: November 14, 2016 Author Share Posted June 16, 2013 Anakid's script have some error.. but make your choice NPC couldn't loaded... please help.. im using ur script.. Quote Link to comment Share on other sites More sharing options...
Capuche Posted June 16, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted June 16, 2013 Change .size = getarraysize( .reward ); into set .size, getarraysize( .reward ); Don't forget to load in mysql // alter table `login` add column `newbie` tinyint(3) unsigned not null default '0', add index (`newbie`); Quote Link to comment Share on other sites More sharing options...
donkeyg Posted June 18, 2013 Group: Members Topic Count: 344 Topics Per Day: 0.07 Content Count: 1060 Reputation: 1 Joined: 02/13/12 Last Seen: November 14, 2016 Author Share Posted June 18, 2013 (edited) Change .size = getarraysize( .reward ); into set .size, getarraysize( .reward ); Don't forget to load in mysql // alter table `login` add column `newbie` tinyint(3) unsigned not null default '0', add index (`newbie`); yeah did it, still couldnot be loaded=.=" heres's my script izlude,128,213,3 script Anniversary Coins 123,{ query_sql "select `last_ip`, `newbie` from `login` where `last_ip` in (SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) +") having `newbie` = max(`newbie`) limit 1", .@last_ip$, .@tmp; if ( .@tmp ) { mes "I'm sorry, the rewards are exclusively for new players."; close; } mes "Welcome! Here are some free gifts"; mes "for newcomers:"; for ( set .@i, 0; .@i < getarraysize(.reward); set .@i, .@i + 2 ) mes .reward[.@i+1] + " x " + getitemname(.reward[.@i]); close2; for ( set .@i, 0; .@i < getarraysize(.reward); set .@i, .@i + 2 ) getitem .reward[.@i], .reward[.@i+1]; query_sql "update `login` set `newbie` = 1 WHERE `last_ip`= '" + .@last_ip$ + "'"; end; OnInit: setarray .reward, 18158,100; // Rewards: <item id>,<item amount> set .size, getarraysize( .reward ); } Edited June 18, 2013 by donkeyg Quote Link to comment Share on other sites More sharing options...
Capuche Posted June 18, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted June 18, 2013 I don't have any errors except for the <tab> in the header. Show your error on mapserv. Quote Link to comment Share on other sites More sharing options...
donkeyg Posted June 19, 2013 Group: Members Topic Count: 344 Topics Per Day: 0.07 Content Count: 1060 Reputation: 1 Joined: 02/13/12 Last Seen: November 14, 2016 Author Share Posted June 19, 2013 (edited) I don't have any errors except for the <tab> in the header. Show your error on mapserv. ok, now i got this problem [Debug]: at script.c:14504 - select `last_ip`, `newbie` from `login` where `last_ip` in (SELECT `last_ip` FROM `login` WHERE `account_id`=2001316) having `newbie` = max(`newbie`) limit 1 [Debug]: Source (NPC): Anniversary Coins at izlude (128,213) : DB error - Unknown column 'newbie' in 'field list'[Debug]: at script.c:14504 - update `login` set `newbie` = 1 WHERE `last_ip`= ''[Debug]: Source (NPC): Anniversary Coins at izlude (128,213) and i can take the coin always everytime i talk to the npc with using the same char..help me pls.. im sure i had installed the SQL in my database,, Edited June 19, 2013 by donkeyg Quote Link to comment Share on other sites More sharing options...
donkeyg Posted June 20, 2013 Group: Members Topic Count: 344 Topics Per Day: 0.07 Content Count: 1060 Reputation: 1 Joined: 02/13/12 Last Seen: November 14, 2016 Author Share Posted June 20, 2013 bump... Quote Link to comment Share on other sites More sharing options...
Capuche Posted June 20, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted June 20, 2013 : DB error - Unknown column 'newbie' in 'field list' im sure i had installed the SQL in my database,,Not me.. reload the sql table Quote Link to comment Share on other sites More sharing options...
donkeyg Posted June 20, 2013 Group: Members Topic Count: 344 Topics Per Day: 0.07 Content Count: 1060 Reputation: 1 Joined: 02/13/12 Last Seen: November 14, 2016 Author Share Posted June 20, 2013 (edited) : DB error - Unknown column 'newbie' in 'field list' /> >im sure i had installed the SQL in my database,, Not me.. reload the sql table how to reload sql table? is it restat server? or recompile server sorry if asking a stupid question Edited June 20, 2013 by donkeyg Quote Link to comment Share on other sites More sharing options...
Capuche Posted June 20, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted June 20, 2013 I mean re try to load the alter sql alter table `login` add column `newbie` tinyint(3) unsigned not null default '0', add index (`newbie`); Quote Link to comment Share on other sites More sharing options...
donkeyg Posted June 21, 2013 Group: Members Topic Count: 344 Topics Per Day: 0.07 Content Count: 1060 Reputation: 1 Joined: 02/13/12 Last Seen: November 14, 2016 Author Share Posted June 21, 2013 I mean re try to load the alter sql alter table `login` add column `newbie` tinyint(3) unsigned not null default '0', add index (`newbie`); ErrorSQL query: ALTER TABLE `login` ADD COLUMN `newbie` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0', ADD INDEX ( `newbie` ) MySQL said: #1060 - Duplicate column name 'newbie' Quote Link to comment Share on other sites More sharing options...
Patskie Posted June 21, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 1 hour ago Share Posted June 21, 2013 maybe you load the script twice. Quote Link to comment Share on other sites More sharing options...
donkeyg Posted June 21, 2013 Group: Members Topic Count: 344 Topics Per Day: 0.07 Content Count: 1060 Reputation: 1 Joined: 02/13/12 Last Seen: November 14, 2016 Author Share Posted June 21, 2013 maybe you load the script twice. how to delete 1 of them? please help me.. Quote Link to comment Share on other sites More sharing options...
Patskie Posted June 21, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 1 hour ago Share Posted June 21, 2013 Make sure you do back up before manipulating your database so it will not be hard if any error will occur in the future. Execute this query then do what Capuche have said. or maybe you can try first the script made by Capuche it might work now. ALTER TABLE login DROP COLUMN newbie Quote Link to comment Share on other sites More sharing options...
donkeyg Posted June 21, 2013 Group: Members Topic Count: 344 Topics Per Day: 0.07 Content Count: 1060 Reputation: 1 Joined: 02/13/12 Last Seen: November 14, 2016 Author Share Posted June 21, 2013 Make sure you do back up before manipulating your database so it will not be hard if any error will occur in the future. Execute this query then do what Capuche have said. or maybe you can try first the script made by Capuche it might work now. ALTER TABLE login DROP COLUMN newbie deleted and re-put it also same.... errors.... so i changed my mind to anakid's script... but what i found is... http://rathena.org/board/topic/83953-free-coins-to-every-players-1-ip-get-1-time-urgent/?p=205643 Quote Link to comment Share on other sites More sharing options...
Question
donkeyg
no mount allowed when equiped *REQUEST*
and a NPC that gives 100 coin to every account ( Same IP address cannot get).
Link to comment
Share on other sites
18 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.