Jump to content

Legend

Members
  • Content Count

    375
  • Joined

  • Days Won

    5

Posts posted by Legend


  1.  

    it keep saying 

     

    Sorry, i only give freebies to third jobs.

     

    idk it doesnt work 

     

    //===== Hercules Script ======================================
    //== Thirds Freebies =========================================
    //===== By: ==================================================
    //== True Zeal ===============================================
    //===== Description: =========================================
    //== Gives free hats one time depending on your job
    //============================================================
    prontera,150,150,3 script Item Giver 606,{
    .@name$ = "[" + strcharinfo(1) + "]";
    
    if (L_ClaimedThirdFreebies == 1) {
      mes .@name$;
      mes "Sorry, you already claimed your freebies!";
      close;
    }
    
    if (BaseJob == Job_Rune_Knight) {
      .@item1 = 5746;
      .@item2 = 15002;
      .@item3 = 2140;
      .@item4 = 2795;
     
      .@4items = 1;
    } else if (BaseJob == Job_Warlock) {
      .@item1 = 2795;
      .@item2 = 5753;
    } else if (BaseJob == Job_Ranger) {
      .@item1 = 5748;
      .@item2 = 2795;
    } else if (BaseJob == Job_Mechanic) {
      .@item1 = 2795;
      .@item2 = 5749;
    } else if (BaseJob == Job_Guillotine_Cross) {
      .@item1 = 5755;
      .@item2 = 2795;
    } else if (BaseJob == Job_Arch_Bishop) {
      .@item1 = 5747;
      .@item2 = 2795;
    } else if (BaseJob == Job_Royal_Guard) {
      .@item1 = 5757;
      .@item2 = 2795;
    
    } else if (BaseJob == Job_Sorcerer) {
      .@item1 = 5756;
      .@item2 = 2795;
    
    } else if (BaseJob == Job_Wanderer) {
      .@item1 = 5758;
      .@item2 = 2795;
    } else if (BaseJob == Job_Minstrel) {
      .@item1 = 5751;
      .@item2 = 2795;
    
    } else if (BaseJob == Job_Genetic) {
      .@item1 = 5752;
      .@item2 = 2795;
    
    } else if (BaseJob == Job_Shadow_Chaser) {
      .@item1 = 2795;
      .@item2 = 5750;
      .@item3 = 6121;
      .@item4 = 6122;
     
      .@4items = 1;
    
    } else if (BaseJob == Job_Sura) {
      .@item1 = 5754;
      .@item2 = 2795;
    
    } else {
      mes .@name$;
      mes "Sorry, I only give freebies to third jobs.";
      close;
    }
    
    
    mes .@name$;
    mes "I see you are a " + jobname(Class) + ",";
    next;
    getitem .@item1,1;
    getitem .@item2,2;
    if (.@4items == 1) {
      getitem .@item3,1;
      getitem .@item4,1;
    }
    L_ClaimedThirdFreebies = 1;
    mes .@name$;
    mes "Take these items.";
    close;
    }
    

     

    Change all BaseJob to Class

    i try it already there is a bug it give me continuous item when i click the npc

     

    I optimized the script a bit:

     

    //===== Hercules Script ======================================
    //== Thirds Freebies =========================================
    //===== Original Script by: True Zeal
    //===== Optimized by: Legend
    //===== Description: =========================================
    //== Gives free hats one time depending on your job
    //============================================================
    
    prontera,150,150,3	script	Item Giver	4_ELEPHANT,{
    	.@name$ = "[" + strnpcinfo(1) + "]";
    	if (L_ClaimedThirdFreebies) {
    		mes .@name$;
    		mes "Sorry, you already claimed your freebies!";
    		close;
    	}
    	mes .@name$;
    	mes "I see you are a " + jobname(Class) + ",";
    	next;
    	switch( Class ){
    		case Job_Rune_Knight:
    			setarray .@a, 5746,15002,2140,2795;
    			break;
    		case Job_Warlock:
    			setarray .@a, 2795,5753;
    			break;
    		case Job_Ranger:
    			setarray .@a, 5748,2795;
    			break;
    		case Job_Mechanic:
    			setarray .@a, 2795,5749;
    			break;
    		case Job_Guillotine_Cross:
    			setarray .@a, 5755,2795;
    			break;
    		case Job_Arch_Bishop:
    			setarray .@a, 5747,2795;
    			break;
    		case Job_Royal_Guard:
    			setarray .@a, 5757,2795;
    			break;
    		case Job_Sorcerer:
    			setarray .@a, 5756,2795;
    			break;
    		case Job_Wanderer:
    			setarray .@a, 5758,2795;
    			break;
    		case Job_Minstrel:
    			setarray .@a, 5751,2795;
    			break;
    		case Job_Genetic:
    			setarray .@a, 5752,2795;
    			break;
    		case Job_Shadow_Chaser:
    			setarray .@a, 2795,5750,6121,6122;
    			break;
    		default: 
    			mes .@name$;
    			mes "Sorry, I only give freebies to third jobs.";
    			close;
    	}
    	mes .@name$;
    	mes "Take these items.";
    	for (.@b = 0; .@b < getarraysize(.@a); .@b++) {
    		getitem .@a[.@b],1;
    	}
    	L_ClaimedThirdFreebies = 1;
    	close;
    }
    

  2. After give him the items and he give me the item, when i talk with him again he doesn't say nothing, just stays in blank, the script:

     

     

    Can you post the whole script? Don't forget to use codebox.


  3. Thanks Legend its working fine... I hope the Developers of Hercules can include equipments being restricted by using the map_zone_db.conf

     

    No prob. You can submit this issue regarding the map_zone_db bug on Herc Github: https://github.com/HerculesWS/Hercules/issues

     

     

     

    I just have a little suggestion. Instead of warping the character out of the map is it possible to just automatically unequip the item when the player tries to use it?

     

    So I modified the script to suit with your request  ;)

    Same Link: http://upaste.me/b63938928ba159ff3

     

    Please do report if you found bugs.


  4. Why the map_zone_db.conf is not disabling those equippable items?

    Is there a way to restrict an equippable item or NONE?

     

    I can confirm this too...

    Equippable items can't be restricted even with map_zone_db, well i thought t'was working properly.

     

    So I made an alternative script

    Link: http://upaste.me/b63938928ba159ff3

    Please do report if you found bugs regarding to that script.

     

    Edit: Oops, found a bug.

    Script updated with the same link!  :P


  5. Hi,

    I am very happy for your help. As previously reported, I have some scripts already ready for you to use as a base, would you like me to send by PM?

     

    Greetings.

     

    Been so very busy this past few days that haven't checked the forums in a while.

     

    Anyways, I would be grateful if there will be base scripts to start with and how the event would probably looks like.

     

    Better post it here so everyone can see it *don't forget to use codebox:no1:


  6. @Asheraf

     

    Hi, thanks for the script and I like the second one, I am getting exactly what I want however the time and date is not same as what's the time on the server. :C

     

     

    You must change this line:

    announce(sprintf("It is currently %d:%d:%d on %s, %s %d%s, %d", .@sec, .@min, .@hour, .@Days$[.@day], .@Months$[.@month], .@dayofmonth, .@tr$, .@year), bc_all);
    

     

     

     

    to this:

    announce(sprintf("It is currently %d:%d:%d on %s, %s %d%s, %d", .@hour, .@min, .@sec, .@Days$[.@day], .@Months$[.@month], .@dayofmonth, .@tr$, .@year), bc_all);
    

    to follow <hour>:<minutes>:<seconds> format.

     

     

    it crashes my server. this one automatically shuts down the map server without any error

     

    It works very well with me.


  7. Hello Hercules!

     

    Can someone know how to do it? change sex per character, as per character gender features of the latest client?

    I know hercules already support this kind of feature.

     

    I would like to request a change sex NPC that needs a coupon or req to change sex per character not the whole account.

     

    I hope someone will respond. Thank you in advance and God Bless!

     

     

    How about this one?

    Link: http://upaste.me/b00c38428cc64de8f


  8. How about this one?

     

    // =============================
    -	script	Support#1	FAKE_NPC,{
    OnInit:
    	setarray .perm$[0],
    		"disable_skill_usage",
    		"disable_exp",
    		"disable_store",
    		"disable_pickup",
    		"disable_pvp",
    		"disable_pvm";
    	.prms = getarraysize(.perm$);
    	end;
    		
    OnCheckHide:
    	while(CheckHide){
    		getmapxy(.@m$, .@mx, .@my, UNITTYPE_PC);
    			if (map$ == .@m$ && mapx == .@mx && mapy == .@my){
    				map$ = "";
    				mapx = 0;
    				mapy = 0;
    				CheckHide = 0;
    				atcommand "@hide";
    				copyarray .@prm$[0], .perm$[0],.prms;
    				for (.@a = 0; .@a < getarraysize(.@prm$); ++.@a){
    					atcommand "@rmvperm "+.@prm$[.@a];
    				}
    				message strcharinfo(0), "You are resurrected!";
    				specialeffect2 226;
    				specialeffect2 18;
    				detachrid;
    				end;
    				
    			}
    		sleep2 500;
    	}
    	end;
    	
    OnPCDieEvent:
    	if (getunittype(killerrid) != UNITTYPE_MOB) end;
    	getmapxy(.@m$, .@mx, .@my, UNITTYPE_PC);
    	map$ = .@m$; mapx = .@mx; mapy = .@my;
    //	dispbottom "Map = "+map$+" X = "+mapx+" Y = "+mapy+"."; // FOR DEBUG PURPOSE.
    	CheckHide = 1;
    	sleep2 1000;
    	atcommand "@raise";
    	atcommand "@hide";
    	copyarray .@prm$[0], .perm$[0],.prms;
    	for (.@a = 0; .@a < getarraysize(.@prm$); ++.@a){
    		atcommand "@addperm "+.@prm$[.@a];
    	}
    	attachrid(getcharid(3,strcharinfo(0)));
    	warp map$,0,0;
    	callsub OnCheckHide;
    	end;
    	
    OnPCLoginEvent:
    	if (!CheckHide) end;
    	atcommand "@hide";
    	copyarray .@prm$[0], .perm$[0],.prms;
    	for (.@a = 0; .@a < getarraysize(.@prm$); ++.@a){
    		atcommand "@addperm "+.@prm$[.@a];
    	}
    	attachrid(getcharid(3,strcharinfo(0)));
    	callsub OnCheckHide;
    	end;
    }
    

     

    *thanks to n0tttt*

     

    @n0tttt nice trick you got there about making its Weight >= 90% :no1: but I can't make use of that status SC_WEIGHTOVER90, it seems it doesn't work properly (bug i guess?). Uh, status icon showed up but when the player started to attack monsters, the icon got removed. 

    So, instead of adding status on them, I do atcommand "@addperm" & "@rmvperm" for their restrictions while on CheckHide status.

     

    @Aeromesi That's okay  :) Happy new year to you!

     

    @ts I suggest you to do some source modding or better use plugins for those atcommands for a cleaner & safer script.


  9. Hello,

     

    I'm creating a system where if a player dies, they are auto hidden and must find the spot they died on to carry on.

     

    World of Warcraft Style.

     

    Is it possible to determine how you have been killed?

     

     

     

     

     

    I tried to figure out and write it, so here's the outcome (this is based on @Aeromesi's idea *thanks to him*):

     

    -	script	Support#1	FAKE_NPC,{
    OnCheckHide:
    	while(CheckHide){
    		getmapxy(.@m$, .@mx, .@my, UNITTYPE_PC);
    			if (map$ == .@m$ && mapx == .@mx && mapy == .@my){
    				map$ = "";
    				mapx = 0;
    				mapy = 0;
    				CheckHide = 0;
    				atcommand "@hide";
    				message strcharinfo(0), "You are resurrected!";
    				specialeffect2 226;
    				specialeffect2 18;
    				detachrid;
    				end;
    				
    			}
    		sleep2 500;
    	}
    	end;
    	
    OnPCDieEvent:
    	getmapxy(.@m$, .@mx, .@my, UNITTYPE_PC);
    	map$ = .@m$; mapx = .@mx; mapy = .@my;
    //	dispbottom "Map = "+map$+" X = "+mapx+" Y = "+mapy+"."; // DEBUG PURPOSE.
    	CheckHide = 1;
    	sleep2 1000;
    	atcommand "@raise";
    	atcommand "@hide";
    	attachrid(getcharid(3,strcharinfo(0)));
    	warp map$,0,0;
    	callsub OnCheckHide;
    	end;
    	
    OnPCLoginEvent:
    	if (!CheckHide) end;
    	atcommand "@hide";
    	attachrid(getcharid(3,strcharinfo(0)));
    	callsub OnCheckHide;
    	end;
    }
    

     

    Note: 

    * I made it looped to determine the player state, WARNING: this might cause lag.

    * Players can attack mobs, players and can even use skills while on hide status since I executed "atcommand @hide", you can fix that by source modding if Im not mistaken.

    * THIS IS JUST AN IDEA.

     

    Well then, good luck!  ;)


  10.  

    Hello Legend,

     

    Thanks for your response..

     

    regarding to the instance, i've already adjust it just for testing.can you check my script if I've adjusted correctly?

     

    
    EndlessTower.txt
    
    instance_set_timeout 120,300,.@instance;
    				instance_init(.@instance);
    
    .@dun_lim_time = etower_timer+300; //5 minutes
    .@dun_lim_time2 = etower_timer+120; /2minutes
    
    
    quest_db.conf
    
    {
    	Id: 60200
    	Name: "Endless Tower Effect"
    	TimeLimit: 300
    },
    {
    	Id: 60201
    	Name: "Endless Tower Time Limit"
    	TimeLimit: 120
    },
    

     

     

    I think that's okay now.  :no1:

     

    Regarding on your first post about Endless Reset, that script of yours won't take effect, its because of the following:

     

    1) This variable ".@etower_timer", ".@" variables is of no use if the NPCs were separated from the original endless tower script.

    2) You need to do "instance_create" before warping to endless tower.

    3) You also need to do "erasequest" to the ongoing "setquest".


  11. It's available as a diff in Nemo patcher

     

    You should apply "enable title bar menu" patch on NEMO.

     

     

    Furthermore, is there a recent Ragexe I should be using? If so, could you please kindly provide me with the link.

    Please note that I have only been working on my ragnarok offline server since two days ago and I still have much to learn.

     

    As of the moment, the only recent client I know is 2016-02-03aRagexeRE which is not yet supported on Herc yet you can manually add its packets.

    RagexeRE Link: http://herc.ws/board/topic/13828-2016-02-03aragexere/

    2016-02-03aRagexe packets link: http://herc.ws/board/topic/13828-2016-02-03aragexere/?p=79004 *packets credits to @4144 & @dastgir*

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.