-
Posts
276 -
Joined
-
Last visited
-
Days Won
2
Lil Troll's Achievements
About Me
Hope I got plenty plenty plenty plenty of time to hone scripting basic skills, to learn source modification, to learn spriting, mapping, client hexing, etc++. ![]()
FILES:
Utility Scripts:
#1: Poll System - IP based restriction --- See topic for full details(Fixed and tweaked).
#2: Customizable Enchant NPC (WIP) --- See topic for full details(Requested).
#3: Promotional Codes --- See topic for full details(Tweaked,Modified,Fixed).
#4: World of Fishing --- See topic for full details(Tweaked,Modified).
#5: Gift System --- See topic for full details(Requested).
#6: Mining-Explosion --- See topic for full details(Requested).
#7: Market Bulletin NPC --- See topic for full details(Requested).
Game/Event Scripts:
#1: Spooky NPC - Refine Event -- See topic for full details(Requested).
Short Requested Scripts:
[spoiler='#1: Party Gold Room']
prontera,150,150,4<TAB>script<TAB>PT-Gold-Room<TAB>443,{
set .plimit = 5 // Limit of party member that can enter to goldroom
set .map$,"prontera"; // input gold room/map here
getpartymember getcharid(1),1;
if([email protected] == .plimit) {
mes "Maximum party count exceeded."; // Improve dialogue
close;
}
warp ".map$",0,0;
end;
-<TAB>script<TAB>PT-GOLD-SCRIPT<TAB>-1,{
OnNPCKillEvent:
set .map$,"prontera"; // input gold room/map here
setarray .item,501,502; //input prizes here(gold,etc)
setarray .mobs,1001,1002,1003,1004,1005; // input mob id/s here
for(set [email protected],1; [email protected] for(set [email protected],1; [email protected] if (killedrid == .mobs[[email protected]] && strcharinfo(3) == .map$[[email protected]]) {
for(set [email protected],1; [email protected] getpartymember getcharid(1),1;
set [email protected],[email protected];
getitem .item[[email protected]],[email protected];
end;
}
}
}
}
}
[spoiler=#2: Online Peak Announcer]/*
DROP TABLE IF EXISTS `player_count`;
CREATE TABLE IF NOT EXISTS `player_count` (
`char_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`count` int(10) unsigned NOT NULL DEFAULT '0',
`date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE = MYISAM;
*/
- script Online_Peak -1,{
OnInit:
query_sql "CREATE TABLE IF NOT EXISTS `player_count` (`char_id` int(10) unsigned NOT NULL AUTO_INCREMENT,`count` int(10) unsigned NOT NULL DEFAULT '0',`date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',PRIMARY KEY (`char_id`)) ENGINE = MYISAM";
OnPCLoginEvent:
set .CurrentOnline,getusers(1);
query_sql("SELECT `count` FROM `player_count` ORDER BY `count` LIMIT 1",[email protected]);
set .OnlinePeak,[email protected][0];
if(getarraysize([email protected]) == 0) {
set .OnlinePeak,.CurrentOnline;
query_sql("INSERT INTO `player_count`(count,date) VALUES("+.OnlinePeak+",NOW())");
}
else {
if(.CurrentOnline>.OnlinePeak) {
set .OnlinePeak,.CurrentOnline;
query_sql("UPDATE `player_count` SET count = '"+.OnlinePeak+"', date = NOW()");
announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
sleep2 3000;
announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
sleep2 3000;
announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
sleep2 3000;
announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
sleep2 3000;
announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all;
}
}
end;
}
[spoiler=#3: Name,Birth Changer]prontera,158,182,0 script Sample 100,{
mes "Blahblah";
menu "Change Name",one,"Change Birth",two;
one:
query_sql "SELECT `name` FROM `ragnarok`.`char` WHERE `name` = '"+strcharinfo(0)+"'",[email protected]$;
set @GID,getcharid(2);
if([email protected]==0){
mes "Please leave your guild first before you change name.";
close;
}
mes "Input name...";
input [email protected]$;
if(getstrlen([email protected]$)<4| getstrlen([email protected]$)>23){
mes "You cannot enter less than minimum of 4 and greater than maximum of 23 characters.";
close;
}
if([email protected]$ == strcharinfo(0)) {
mes "You cannot enter same name.";
close;
}
query_sql "SELECT `name` FROM `ragnarok`.`char` WHERE `name` = '"[email protected]$+"'",[email protected]$;
if([email protected]$ == [email protected]$){
mes "Name already exists.";
close;
}
mes "New name: "[email protected]$+"";
query_sql "UPDATE `char` SET `name` = '"+escape_sql([email protected]$)+"' WHERE `name` = '"+strcharinfo(0)+"'";
sleep2 1000;
mes "Name successfully changed, please relog to see changes.";
close;
two:
query_sql "SELECT `birthdate` FROM `ragnarok`.`login` WHERE `account_id` = '"+getcharid(3)+"'",[email protected]$;
mes "Birth Date: "[email protected]$+"";
mes "Input Year of Birth.";
input [email protected];
if([email protected]==0){
mes "You entered wrong number of month.";
close;
}
mes "Input Month of Birth.";
input [email protected];
if([email protected]==0||[email protected]>12){
mes "You entered wrong number of month.";
close;
}
mes "Input Day of Birth.";
input [email protected];
if([email protected]==0||[email protected]>31){
mes "You entered wrong number of day.";
close;
}
mes "New B-D: "[email protected]+"-"[email protected]+"-"[email protected]+"";
query_sql "UPDATE `login` SET `birthdate` = '"+escape_sql([email protected])+"-"+escape_sql([email protected])+"-"+escape_sql([email protected])+"' WHERE `account_id` = '"+getcharid(3)+"'";
sleep2 1000;
mes "Birth Date successfully changed!";
close;
}
If you like to suggest your idea or you do find bug/error please report it on each individual topic. THANKS! ![]()