Jump to content

Garr

Members
  • Content Count

    482
  • Joined

  • Last visited

  • Days Won

    8

Posts posted by Garr


  1. ** Create a permanent monster spawn:
    
    <map name>,<x>,<y>,<xs>,<ys>%TAB%monster%TAB%<monster name>%TAB%<mob id>,<amount>,<delay1>,<delay2>,<event>{,<mob size>,<mob ai>}
    
    ...
    
    There are two optional fields for monster size and AI. Size can be 0 
    (medium), 1 (small), or 2 (big). AI can be 0 (default), 1 
    (attack/friendly), 2 (sphere), 3 (flora), or 4 (zanzou).
    

     

    Also

    *monster     "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>"{,<size>{,<ai>}}};
    *areamonster "<map name>",<x1>,<y1>,<x2>,<y2>,"<name to show>",<mob id>,<amount>{,"<event label>"{,<size>{,<ai>}}};
    
    ...
    
    
    <size> can be:
    	0 = medium (default)
    	1 = small
    	2 = big
    

    From doc/script_commands.txt


  2. Replace

    .itemname$[ .@k ] = getitemname( .itemid[ .@k ] );
    

    with

    .itemname$[ .@k ] = (getitemname( .itemid[ .@k ] ) != "null")?getitemname( .itemid[ .@k ] ):"";
    

    That way nothing will be altered, client doesn't show empty options (""), but still counts them in when returning chosen index.


  3. That's exactly what I gave you, locations of all the pictures client uses. It's called "skin", since it can be selected. I'd advice you check if it works better with other skins (those can be places inside "skin" folder near client), if so then your current one is the problem, otherwise problem might be in exe itself, and then probably only @Neo can help you out.


  4. Everything, and I mean *EVERYTHING* graphic related is client-side only. Server mostly works only with logic. Iirc only ever exception are guild emblems. And only because it needs to send them to other people. And, as far as I know, basic skin is located inside data.grf, "data\texture\À¯ÀúÀÎÅÍÆäÀ̽º". But i'd put my finger on skins, they should be in skin folder near your client.


  5. 
    

    *setiteminfo(<item id>,<type>,<value>)

     

    This function will set some value of an item.

    Returns the new value on success, or -1 on fail (item_id not found or

    invalid type).

     

    Valid types are:

    0 - Buy Price; 1 - Sell Price; 2 - Item Type;

    3 - maxchance (Max drop chance of this item e.g. 1 = 0.01% , etc..

    if = 0, then monsters don't drop it at all (rare or a quest item)

    if = 10000, then this item is sold in NPC shops only

    4 - sex; 5 - equip; 6 - weight; 7 - atk; 8 - def; 9 - range;

    10 - slot; 11 - look; 12 - elv; 13 - wlv; 14 - view id

     

    Example:

     

    setiteminfo Stone, 6, 9990; // Stone now weighs 999.0


  6. By the looks of it there should be extra file with functions/routines, namely mission_settime and mission_sethunting.

     

    ETA: Try this one, don't forget to load the file I mentioned before this script.

    prt_in,90,72,4	script	Zeph::HuntingSystem	4_M_JOB_HUNTER,{
    	mes "[^FFA500Zeph^000000]";
    	if( Mission_Tick < gettimetick(2) ) {
    		if( Mission_Tick == 0 ) {
    			mes "Hello...";
    			mes "Are you interesting in a job?";
    			next;
    			next;
    			mes "[^FFA500Zeph^000000]";
    			mes "I've to explain, I find many peoples interesting in ^0000FFHunting Missions^000000 every day.";
    			mes "The missions consist of monsters to kill.";
    			next;
    			mes "[^FFA500Zeph^000000]";
    			mes "There are different difficulty Missions.";
    			mes "But don't worry, you can work with your friends in groups or in any team.";
    			next;
    			mes "[^FFA500Zeph^000000]";
    			mes "You will have exactly 24 hours to complete a mission, if you finish in time then come back to me for the premium.";
    		} else if( Mission_Ended ) {
    			mes "Your new mission is ready, and I've looked over the documents.";
    			mes "Are you ready to take on it?";
    		} else {
    			mes "You've failed your last mission, you didn't finish within 24 hours or doesn't eliminated the total requested monsters.";
    			next;
    			mes "[^FFA500Zeph^000000]";
    			mes "There is your today's Mission.";
    			mes "Are you ready to take on it?";
    		}
    
    		next;
    		if( select("Yes, what is my job?:No thanks, not today.") == 2 ) {
    			mes "[^FFA500Zeph^000000]";
    			mes "Okay, come back if you've changed your mind.";
    			close;
    		}
    
    		mes "[^FFA500Zeph^000000]";
    		mes "I let you reading...";
    		next;
    
    		// Building Mission...
    		// =======================================================================================================
    		callfunc("mission_settime",gettimetick(2) + 86400);
    		// Mission Difficulty
    		.@Mission_Rank = ((Mission_Rank % 45) * 2) + 1;
    		// Bonus Difficulty
    		.@Mission_Bonus = (Mission_Rank / 45) * 5;
    		// Final Difficulty
    		.@Mission_Rank = min(.@Mission_Rank + .@Mission_Bonus,99);
    		Mission_Ended = 0;
    		for( .@i = 1; .@i < 6; ++.@i ) {
    			.@MobID = getmobrandid(.@Mission_Rank, 14);
    			// Mission Index - Mob ID - Mob Amount
    			callfunc("mission_sethunting",.@i, .@MobID, 75 - (.@Mission_Rank / 2) + (.@Mission_Bonus / 2));
    		}
    
    		callfunc "MissionInfo";
    		next;
    
    		mes "[^FFA500Zeph^000000]";
    		mes "Good luck, and remember that you have 24 hours to complete it.";
    		mes "Come back if you're finished.";
    		close;
    	} else {
    		mes "Hello, already here?";
    		mes "Let's see how you completed the mission...";
    		next;
    
    		if( Mission_Count1 + Mission_Count2 + Mission_Count3 + Mission_Count4 + Mission_Count5 < 1 ) {
    			mes "[^FFA500Zeph^000000]";
    			if( Mission_Ended == 0 ) {
    				mes "Great! You did it ahead of schedule.";
    				mes "Let me pay you for the job.";
    				next;
    
    				.@Mission_Lvl = 0;
    				.@Mission_Exp = 0;
    				.@Mission_Job = 0;
    				for( .@i = 1; .@i < 6; ++.@i ) {
    					.@MobID = getd("Mission_ID" + .@i);
    					.@Mission_Lvl = .@Mission_Lvl + strmobinfo(3, .@MobID);
    					.@Mission_Exp =  .@Mission_Exp + (strmobinfo(6, .@MobID) * 10);
    					.@Mission_Job = .@Mission_Job + (strmobinfo(7, .@MobID) * 10);
    				}
    				.@Mission_Zeny = .@Mission_Lvl * 150;
    				if( .@Mission_Lvl < 125 )
    					.@Mission_Points = 5;
    				else if( .@Mission_Lvl < 250 )
    					.@Mission_Points = 10;
    				else
    					.@Mission_Points = 15;
    
    				// Mission Rewards...
    				// =====================================================================
    				getexp .@Mission_Exp, .@Mission_Job, 100;
    				Zeny += .@Mission_Zeny;
    				Mission_Points += .@Mission_Points;
    				if( Mission_Rank < 449 )
    					++Mission_Rank;
    				++Mission_Completed;
    				if( Mission_Completed > $TMission_Score ) {
    					npctalk "Congratulations, you're the new Top Hunter of the day!!";
    					$TMission_Score = Mission_Completed;
    					$TMission_CharID = getcharid(0);
    					$TMission_Name$ = strcharinfo(0);
    					$TMission_Job$ = jobname(Class);
    				}
    
    				if( $TMission_CharID == getcharid(0) )
    					#CASHPOINTS += 100;
    				else
    					#CASHPOINTS += 75;
    
    				getitem 8996,1;
    				// =====================================================================
    
    				// Clear Mission Data
    				for( .@i = 1; .@i < 6; ++.@i )
    					callfunc("mission_sethunting",.@i,0,0);
    				Mission_Ended = 1;
    			}
    
    			mes "[^FFA500Zeph^000000]";
    			mes "Your today's Mission is now complete.";
    
    			set .@Time_Left, Mission_Tick - gettimetick(2);
    			if( .@Time_Left > 3600 )
    				mes "You can get a new mission in ^0000FF" + (.@Time_Left / 3600) + " hours^000000.";
    			else if( .@Time_Left > 60 )
    				mes "You can get a new mission in ^0000FF" + (.@Time_Left / 60) + " minutes^000000.";
    			else if( .@Time_Left > 0 )
    				mes "You can get a new mission in ^0000FF" + (.@Time_Left) + " seconds^000000.";
    			else
    				mes "Let me sort out my papers to your new assignment.";
    			close;
    		}
    
    		mes "[^FFA500Zeph^000000]";
    		mes "You're still not completed the mission, your missing monsters will be removed.";
    		mes "Look at the poster on my left to see the status of your job.";
    		close;
    	}
    }
    

  7. Umm, iono where you got that info, but bubblegum doesn't give 2x chances, it actually doubles rate (just check its script, it gives SC status that multiplies current item rates). But iirc it's capped at 90% for non-guaranteed drops (>90% stayes unchanged, 90%~45% becomes 90%, <45% becomes 2x)


  8. Well, probability works as follows: each card has 99% chance to fail (0.99), so there's a 0.99^4 = ~0.9606 (96.06%) chance that not a single card will hit. Rest (0.0394/ 3.94%) is the chance that *at least one* card effect will proc.

     

    ETA: Seems like file itself is deleted, I think? I can't get access to it as well.


  9. ^

    I just composed a test case script and it worked calling cutin with both name in variable, or composed right on the spot.

    prontera,151,151,0	script	VarTest	2_BULLETIN_BOARD,{
    	cutin "kafra_07",2;
    	mes "Hello!";
    	next;
    	cutin "",255;
    	mes "Where'd my pic go?";
    	next;
    	.@var = 7;
    	//.@var$ = "kafra" + "_" + "07";
    	cutin "kafra" + "_0" + .@var,2;
    	mes "Is it here?";
    	close;
    }
    

  10. Yes, NPC variables are not stored for long-keeping, so they are reset on reload. You'll be better off using $variables. Those do get saved inside SQL (mapreg table).

     

    Also, you do know that int variables have cap at INT_MAX(2,147,483,647) ? With zeny donations, high enough rates and enough time, you can hit that limit. Just a fair warning.

×
×
  • Create New...

Important Information

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