Jump to content

Lil Troll

Members
  • Posts

    276
  • Joined

  • Last visited

  • Days Won

    2

Lil Troll last won the day on October 4 2013

Lil Troll had the most liked content!

6 Followers

About Lil Troll

  • Birthday 01/01/1998

Profile Information

  • Gender
    Male
  • Location
    In your mind.
  • Server
    none
  • Interests
    Learning! :)

Recent Profile Visitors

6868 profile views

Lil Troll's Achievements

Poring

Poring (1/15)

24

Reputation

8

Community Answers

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($@partymembercount == .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 .@a,1; .@a for(set .@b,1; .@b if (killedrid == .mobs[.@a] && strcharinfo(3) == .map$[.@b]) {
for(set .@e,1; .@e getpartymember getcharid(1),1;
set .@ptc,$@partymembercount;
getitem .item[.@e],.@ptc;
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",.@CountUsers);
set .OnlinePeak,.@CountUsers[0];
if(getarraysize(.@CountUsers) == 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)+"'",.@current$;    
            set @GID,getcharid(2);
            if(!@GID==0){
                mes "Please leave your guild first before you change name.";
                close;
            }
            mes "Input name...";
            input .@name$;
            if(getstrlen(.@name$)<4| getstrlen(.@name$)>23){
                mes "You cannot enter less than minimum of 4 and greater than maximum of 23 characters.";
                close;
            }
            if(.@name$ == strcharinfo(0)) {
                mes "You cannot enter same name.";
                close;
            }
            query_sql "SELECT `name` FROM `ragnarok`.`char` WHERE `name` = '"+.@name$+"'",.@existing$;
            if(.@name$ == .@existing$){
                mes "Name already exists.";
                close;
            }                
            mes "New name: "+.@name$+"";
            query_sql "UPDATE `char` SET `name` = '"+escape_sql(.@name$)+"' 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)+"'",.@birthdate$;
            mes "Birth Date: "+.@birthdate$+"";
            mes "Input Year of Birth.";
            input .@year;
            if(.@year==0){
                mes "You entered wrong number of month.";
                close;
            }
            mes "Input Month of Birth.";
            input .@month;
            if(.@month==0||.@month>12){
                mes "You entered wrong number of month.";
                close;
            }
            mes "Input Day of Birth.";
            input .@day;
            if(.@day==0||.@day>31){
                mes "You entered wrong number of day.";
                close;
            }
            mes "New B-D: "+.@year+"-"+.@month+"-"+.@day+"";
            query_sql "UPDATE `login` SET `birthdate` = '"+escape_sql(.@year)+"-"+escape_sql(.@month)+"-"+escape_sql(.@day)+"' 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!  :)

 
×
×
  • Create New...