Jump to content

Emistry

Forum Moderator
  • Posts

    9,746
  • Joined

  • Days Won

    305

Posts posted by Emistry

  1. [email protected],82,112,2	script	#102FShadowDust1	844,{
    	end;
    
    OnInstanceInit:
    	donpcevent instance_npcname("#102FShadowDust")+"::OnEnable";
    	monster instance_mapname("[email protected]"),83,85,"Entweihen Crothen",1957,1,instance_npcname("#102FShadowDust1")+"::OnMyMobDead";
    	end;
    
    OnMyMobDead:
    	set [email protected]$, instance_mapname("[email protected]");
    	set [email protected]_dead_num,mobcount([email protected]$,instance_npcname("#102FShadowDust1")+"::OnMyMobDead");
    	if ([email protected]_dead_num < 1) {
    		mapannounce [email protected]$, "Mysterious Voice: Who are you to dare intrude upon my sanctuary?!",bc_map,"0xffff00";
    		donpcevent instance_npcname("#102FShadowDust")+"::OnDisable";
    		donpcevent instance_npcname("Lucid Crystal#102")+"::OnEnable";
    		enablenpc "Devil Square Guardian#2";
    		//SetItemPartyInMap in_102floor 100
    		
    		hideoffnpc instance_npcname("et_reward_npc"); // <------- ADD THIS
    	}
    	end;
    }
    [email protected],83,85,4	script	et_reward_npc	406,{
    	// rewards...
    	end;
    	
    	OnInstanceInit:
    		hideonnpc strnpcinfo(3);
    		end;
    }

     

  2. -	script	hourly_point_main	-1,{
     
    	OnInit:
    		.npc_name$ = strnpcinfo(3);
    		bindatcmd "check",.npc_name$+"::OnAtcommand";
    		end;
     
    	OnAtcommand:
    		dispbottom "Accumulated "+#daily_minute_count;
    		end;
     
    	OnUpdate:
    		if (checkvending()) {
    			dispbottom "Hourly point stopped due to vending.";
    			end;
    		}
    		#daily_minute_count++;
    		deltimer .npc_name$+"::OnUpdate";
    		switch ( #daily_minute_count ) {
    			default:
    				break;
    			case 60: // 60 minutes
    				#CASHPOINT += 1;
    				getitem 677,1;
    				break;
    			case 120: // 120 minutes
    				#CASHPOINT += 1;
    				getitem 677,1;
    				break;
    			case 180: // 180 minutes
    				#CASHPOINT += 1;
    				getitem 677,1;
    				break;
    			case 240: // 240 minutes
    				#CASHPOINT += 1;
    				getitem 677,1;
    				break;
    			case 300: // 300 minutes
    				#CASHPOINT += 1;
    				getitem 677,1;
    				break;
    			case 360: // 360 minutes
    				#CASHPOINT += 1;
    				getitem 677,1;
    				break;
    			case 420: // 420 minutes
    				#CASHPOINT += 1;
    				getitem 677,1;
    				break;
    			case 480: // 480 minutes
    				#CASHPOINT += 1;
    				getitem 677,1;
    				#daily_minute_count = 0; // reset.
    				break;
    		}
     
    	OnPCLoginEvent:
    		addtimer ( 60 * 1000 ), .npc_name$+"::OnUpdate";
    		end;
    }

     

    • Upvote 1
  3.     EquipScript: |
          addtimer (60 * 1000), "Sample::OnUpdate";
        UnEquipScript: |
          deltimer "Sample::OnUpdate";
    -	script	Sample	-1,{
    	OnUpdate:
    		if (checkvending()) {
    			dispbottom "Hourly Point stopped due to vending.";
    		}
    		else if (checkchatting()) {
    			dispbottom "Hourly Point stopped due to chatroom.";
    		}
    		else if (checkidle() >= 60) { // idled for 60 seconds
    			dispbottom "Hourly Point stopped due to idle.";
    		}
    		else {
    			#hourly_point_duration++;
    			if (#hourly_point_duration >= 60) {
    				#hourly_point++;
    				dispbottom "Hourly Point +1. Total "+#hourly_point+" Points.";
    			}
    			addtimer (60 * 1000), strnpcinfo(3)+"::OnSample";
    		}
    		end;
    }

     

    • Upvote 1
  4.   - Id: 501
        AegisName: Red_Potion
        Type: Healing
        Script: |
          callfunc("F_SignedItem", 501, IG_Taming);
    function	script	F_SignedItem	{
    	[email protected]_id = getarg(0, 0);
    	[email protected] = getarg(1, 0);
    	
    	if ([email protected]_id && [email protected]) {
    		getinventorylist;
    		for ([email protected] = 0; [email protected] < @inventorylist_count; [email protected]++) {
    			if (@inventorylist_id[[email protected]] == [email protected]_id && @inventorylist_card3[[email protected]] && @inventorylist_card4[[email protected]]) {
    				[email protected]_cid = (@inventorylist_card3[[email protected]] | (@inventorylist_card4[[email protected]] << 0x10));
    				query_sql("SELECT `name` FROM `char` WHERE `char_id` = "[email protected]_cid, [email protected]_name$);
    				[email protected]_name$ = getitemname([email protected]_id);
    				if ([email protected]_name$ != "")
    					[email protected]_name$ = [email protected]_name$+"'s " + [email protected]_name$;
    				[email protected]_name$[[email protected]] = [email protected]_name$;
    				[email protected]$ = [email protected]$ + [email protected]_name$;
    			}
    			[email protected]$ += ":";
    		}
    		[email protected] = select([email protected]$) - 1;
    		delitem2 @inventorylist_id[[email protected]],1,@inventorylist_identify[[email protected]],@inventorylist_refine[[email protected]],@inventorylist_attribute[[email protected]],@inventorylist_card1[[email protected]],@inventorylist_card2[[email protected]],@inventorylist_card3[[email protected]],@inventorylist_card4[[email protected]];
    		[email protected]_id = groupranditem([email protected]);
    		getitem [email protected]_id, 1;
    		announce "["+strcharinfo(0)+"] has obtained "+getitemname([email protected]_id)+" from ["[email protected]_name$[[email protected]]+"'s "+getitemname([email protected]_id)+"]!!!", bc_all;
    	}
    	return;
    }

    you can try something like this.

    • Upvote 1
  5. -	script	atcmd_example	-1,{
    OnInit:
    	bindatcmd "killcount", strnpcinfo(3) + "::OnAtcommand";
    	end;
    	
    OnAtcommand:
    	if (compare([email protected]_parameters$, "reset")) {
    		#killcount_mob_id = 0;
    		#killcount_amount = 0;
    		dispbottom [email protected]_command$+" reset successfully.";
    	}
    	else if (getmonsterinfo(atoi([email protected]_parameters$), MOB_NAME) != "null") {
    		[email protected]_mob_id = atoi([email protected]_parameters$);
    		if ([email protected]_mob_id != #killcount_mob_id) {
    			#killcount_mob_id = [email protected]_mob_id;
    			#killcount_amount = 0;
    			dispbottom [email protected]_command$+" will start count "+getmonsterinfo(#killcount_mob_id, MOB_NAME)+".";
    		}
    	}
    	else if (#killcount_mob_id) {
    		dispbottom getmonsterinfo(#killcount_mob_id, MOB_NAME)+" Kill: "+F_InsertComma(#killcount_amount);
    	}
    	else {
    		dispbottom [email protected]_command$+" failed. Usage: "[email protected]_command$+" <mob_id/reset>";
    	}
    	end;
    	
    OnNPCKillEvent:
    	if (killedrid == #killcount_mob_id) {
    		#killcount_amount++;
    		dispbottom getmonsterinfo(#killcount_mob_id, MOB_NAME)+" Kill: "+F_InsertComma(#killcount_amount);
    	}
    	end;
    }

     

    • Upvote 3
  6. OnNPCKillEvent:
    	if (getgmlevel() >= .gm ) end; // If gm = event wont happen
    	if ( getmonsterinfo( killedrid, MOB_MVPEXP )) {
    		for ([email protected] = 0; [email protected] < getarraysize(.t_maps$); [email protected]++) {
    		if ( strcharinfo(3) == instance_mapname("06guild_01") ) end; 
    		if ( strcharinfo(3) == instance_mapname("force_1-1") ) end;
    		if ( strcharinfo(3) == .t_maps$[[email protected]]) { 
    			if (rand(100) < .chance) getitem .s_rwd[0], .s_rwd[1];
    			announce "[ System ] : Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" alone at "+ strcharinfo(3), bc_all;
    			MVPKills = MVPKills+1;
    			dispbottom "---------------------------------------------------";
    			dispbottom "You killed a total of "+MVPKills+" MVP"+((MVPKills == 1)?"":"s")+".";
    			dispbottom "---------------------------------------------------";
    			end;
    			}
    		}
    		end;
    	}

     

  7. On 9/1/2021 at 6:28 AM, eArt said:

    ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

    i am sure you can find tons of guide to resolve your policy requirements by searching the internet. ex: https://ostechnix.com/fix-mysql-error-1819-hy000-your-password-does-not-satisfy-the-current-policy-requirements/

     

    On 9/1/2021 at 6:28 AM, eArt said:

    and how do I add my password to this code?

      CREATE USER 'ragnarok'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD';
      GRANT ALL PRIVILEGES ON ragnarok.* to 'ragnarok'@'%' IDENTIFIED BY 'YOUR_PASSWORD';

    the IDENTIFIED BY is refer for your password.

     

×
×
  • Create New...

Important Information

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