-
Posts
567 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by Yoona
-
-
prontera,168,184,3 script Freebies 479,{ mes .NPC$; mes "Wanna get the freebies " +strcharinfo(0)+ "?"; next; if (select("Yes:No") - 1) close; mes .NPC$; mes "Let me check if you are really a new member"; next; query_sql("SELECT last_ip, account_id FROM `login` WHERE account_id = "+getcharid(3)+"", .@lastip,.@accid); query_sql("SELECT last_ip FROM `freebies`", .@freebiesip); if (.@lastip == .@freebiesip && .@accid == getcharid(3)) { mes .NPC$; mes "You already got the freebies " +strcharinfo(0); close; } query_sql("INSERT INTO `freebies` VALUES (NULL," + getcharid(3) + ",'" + escape_sql(strcharinfo(0)) + "','" + .@lastip + "')"); for ( set .@x,0; .@x < getarraysize(.freebie_item); set .@x,.@x + 1 ) { getitem .freebie_item[.@x], .quantity[.@x]; } close; OnInit: set .NPC$, "[ " +strnpcinfo(1)+ " ]"; .freebie_item[0],30316,30315,30314,30027,30028,30029,30030,4302,4403,7227,30499,671,2629,2630,4140; setarray .quantity[0],1,1,1,1,1,1,1,1,1,1000,1,1000,2,2,4; waitingroom "Freebies Here",0; end; }
It duplicates because you dont have an account ID check. it wont really insert not unless you'll use "update".I assume that your player have changed IP, so he/she was able to get another freebie item, unfortunately, his/her account_id was already registered. That's why it produced an error for duplicating an existing row using the account id which is your freebie's primary key.And also try this sqlCREATE TABLE IF NOT EXISTS `freebies` ( `id` int(11) NOT NULL auto_increment, `account_id` int(11) NOT NULL default '0', `name` varchar(23) NOT NULL default '', `last_ip` varchar(15) NOT NULL, PRIMARY KEY (`account_id`), KEY (`id`) ) ENGINE=MyISAM;
edit:
sorry... change this
if (.@lastip == .@freebiesip && .@accid == getcharid(3))
to this:
if (.@lastip == .@freebiesip || .@accid == getcharid(3))
i got an error at line 26?
-
-
Please take note that IP address can be easily changed.
Anyway, this is the script:
amatsu,116,146,3 script Seyra 90,{ set .@n$, "[Seyra]"; setarray .@rwd[0],2115,1,2357,1,2421,1,2524,1; // 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; OnInit: waitingroom "Newbie Gift!",0; end; }
soo, if IP can easily changed is there any other way to prevent that? by using this script? please
-
Its all about this script:
prontera,168,184,3 script Freebies 479,{
mes .NPC$;
mes "Wanna get the freebies " +strcharinfo(0)+ "?";
if (select("Yes:No") - 1) close;
mes .NPC$;
mes "Let me check if you are really a new member";
next;
query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@lastip$);
query_sql("SELECT last_ip FROM `freebies`", .@freebiesip$);
if (.@lastip$ == .@freebiesip$) {
mes .NPC$;
mes "You already got the freebies " +strcharinfo(0);
close;
}
query_sql("INSERT INTO `freebies` VALUES (NULL," + getcharid(3) + ",'" + escape_sql(strcharinfo(0)) + "','" + .@lastip$ + "')");
for ( set .@x,0; .@x < getarraysize(.freebie_item); set .@x,.@x + 1 ) {
getitem .freebie_item[.@x], .quantity[.@x];
}
close;
OnInit:
set .NPC$, "[ " +strnpcinfo(1)+ " ]";
setarray .freebie_item[0],30316,30315,30314,30027,30028,30029,30030,4302,4403,7227,30499,671,2629,2630,4140;
setarray .quantity[0],1,1,1,1,1,1,1,1,1,1000,1,1000,2,2,4;
waitingroom "Freebies Here",0;
}and on mysql
CREATE TABLE IF NOT EXISTS `freebies` (
`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;it keeps giving items, and here's a picture of SQL error's
Bump =( Please
-
im not sure though but you can search it on goggle, if there's a solution about changing that one..
-
i guess that what 2012-04-10 Client, and its but if you want a client that dont close when you change char use lower version of client =)
-
@Winz same here i thought the problem was about mmo.h =)
-
Hey Yoona, clarifying again, it's actually "TortoiseSVN" (the coolest interface to (Sub)version control) (that's what they say)
@TS:
The best way is.. to.. open the Wiki. many people had contributed there.
hahah lol thanks i've got a low when it comes on remembering
-
-
You can see all of this in your trunk/conf/inter_athena.conf
// MySQL Character SQL server
char_server_ip: 127.0.0.1
char_server_port: 3306
char_server_id: ragnarok <= Mysql username
char_server_pw: ragnarok <= your mysql password
char_server_db: ragnarok <= this one should be your main table where you extract your main.sql
// MySQL Map SQL Server
map_server_ip: 127.0.0.1
map_server_port: 3306
map_server_id: ragnarok <= Mysql username
map_server_pw: ragnarok <= your mysql password
map_server_db: ragnarok <= this one should be your main table where you extract your main.sql
// MySQL Log SQL Database
log_db_ip: 127.0.0.1
log_db_port: 3306
log_db_id: ragnarok <= Mysql username
log_db_pw: ragnarok <= your mysql password
log_db_db: ragnarok <= now for this one, change it to your log table " where you extract your log.sql "
log_codepage:
log_login_db: loginlogI hope i explained it correctly =)
-
Ohh, go with Winz suggestion =) i think that's the problem
@Winz sorry =) just trying to help but thanks for reminding me. hehe
-
did you check your mmo.h ?
#PACKETEVER " date of the client " for example 2010-04-10 like this, so it should look like this
#PACKETEVR 20100410
and re check the guide maybe you missed something in configuration
-
i guess something's wrong in your configuration like for example at inter_athena.conf or char_athena.conf im not so sure though
-
emm,just simply create the data folder by right clicking on the white space > New > New Folder and rename it to 'data'
now no more error but when i click my client nothing happen i already did run as admin then not continue loading :'(
Can i add you on your facebook so you can help me please? this is my 1st time please help me please? im begging you please.
you can get data files here
Click This then extact it in your ROFOLDER
-
Check all he's Video's it can help you...
http://www.youtube.com/user/Sharpienero?feature=watch
thanks to Sharpienero for making this guide =) -
you can use goggle.com and type how to make a private ragnarok online server
- 1
-
Hoping that someone can give me this kind of script =)
A gold room with 3 different rooms, max players can enter for each room is 3 sounds like a Private Gold Room
Thank you! =) in advance...
-
what file? please help me please please i always get that error when i redo my client set-upi think your missing that file in your data folder...
what are you using? grf or data?
i already encounter this problem but i forgot, let me search it on goggle....
here's the link
http://rathena.org/board/topic/75462-string-buf10-attempt-to-call-global-iter-gettable-a-nil-value/
what do you mean what im using? where can i see what im using? please tell me my server side is ok but client is not working
by running your server the data files are important did you make it an grf file? or just the normal data?
-
what file? please help me please please i always get that error when i redo my client set-upi think your missing that file in your data folder...
what are you using? grf or data?
i already encounter this problem but i forgot, let me search it on goggle....
here's the link
http://rathena.org/board/topic/75462-string-buf10-attempt-to-call-global-iter-gettable-a-nil-value/
-
set .NPC$, "[ " strnpcinfo(1)+ " ]";
Should be :
set .NPC$, "[ " +strnpcinfo(1)+ " ]";
Wow! thanks Patskie =)
-
i think your missing that file in your data folder...
-
Hello Yoona,
I believe you are using either Neoncube or JikariCube.
Yes, that is the way you are sending the patchfiles.That will mean:this patch will patch your grf file (since you wrote it 1 GRF 2010-09-10.grf)Sorry, my bad. it's correct - the way you write it. but, you forgot the thing about "patch number"
it should be like this:
PatchNumber<space>GRF.Number<space>PatchDestination<space>filename.ext
so, could be like this:
200 1 GRF 2010-09-10.grf
*the number in blue is set up-to-you. otherwise, if you set the last number is 20.000, then, the next patch must be larger than 20.000 (i.e: 20.001, etc)
Have a nice day!
Thank you for the response Winz =) i will try it
and by doing the files that im going to update Directory should be like this? data/texture/... ?
and it should be in grf or gpf file?
-
getitem .freebie_item[.@x], ..quantity[.@x];
Should be :
getitem .freebie_item[.@x], .quantity[.@x];
now there's a problem in line 23, i check the problem it says parse_line need ";"
but i check the script its not missing ";"
line 23
set .NPC$, "[ " strnpcinfo(1)+ " ]";
what should i do?
-
amatsu,116,146,3 script Seyra 90,{ set .@n$, "[Seyra]"; setarray .@rwd[0],2115,1,2357,1,2421,1,2524,1; // 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; OnInit: waitingroom "Newbie Gift!",0; end; }
this one check the IP/MAC of the newbie or player right Anakid?
Help with Freebies
in Scripting Support
Posted
now its error in line 30 =( it says
" parse_line: expect command, missing function name or calling undeclared dunction "