Jump to content

PandaLovesHamster

Members
  • Posts

    452
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by PandaLovesHamster

  1. areaannounce "guild_room",309,373,319,363,"Correct!",0;
    areaannounce "guild_room",325,373,335,363,"Wrong!",0;
    

    Is the easiest thing to do, but if you really want the dispbottom thing then:

    close2;
    	announce "[ "+ strcharinfo(0) +" ] :answer is False.",bc_map;
    	set .@i,0; // 0 = false | 1 = true
    	sleep2 4500;
    	switch(.@i){
    		case 0:			
    			areawarp "guild_room",309,373,319,363,"prontera",150,150;
    			dispbottom "You got the wrong answer.";
    		end;
    		case 1:
    			areawarp "guild_room",325,373,335,363, "guild_room",322,367;
    			dispbottom "You got the right answer.";
    		end;
    	}
    
    
  2. ama_dun03.gat,120,100,0,0	boss_monster	Samurai Specter	1492,1,3600000,0,"BossNPC::OnMVPDead"
    
    
    -	script	BossNPC	-1,{
    
    OnMVPDead:
    //if ( getmonsterinfo( killedrid, 22 ) ) {
    	set .@GID,getcharid(2);
    	set .@map$,strcharinfo(3);
    	set .@ID,killedrid;
    	removemapflag .@map$,mf_gvg;
    	announce strcharinfo(0)+" from the [ "+ getguildName(.@GID) +" ] guild has killed "+.@ID,0;
    	initnpctimer;
    	end;
    }
    

    Issue:

    .@ID will always display 0 if I keep killing the mob that was spawned by using the script above. Everytime I do @reloadscript, the same thing happens, 0. If I restart the server and kill the mob, it will still announce as 0.

    If I kill another mob and kill the MVP spawned through the script, it will display the mob ID I have killed before the MVP. Therefore the MVP itself is not updating the killedrid variable.

    Help on to fix this please?

  3. areaannounce "guild_room",309,73,319,363,"You're correct! Warping you back to the center.",0;
    

    Try that. Also, it would be better if you post the line of script you are working with and got the error, that way we can tell you what you did wrong so it will be easier for you to learn. Note: I'm learning too >,< just newbie.

  4. Thanks, I will test this as soon as I get back from class. I should have read isloggedin more and could have noticed that it asks for AID. Thanks for pointing that out.

    Question:

    getmapxy(.Map$,.@x,.@y,0);
    warpparty .Map$,.@x,.@y,.@ptparty;
    

    I was the one who coded this, but I'm not sure if that one works the right way I want it to. What I want is that the NPC gets the GM's coordinates and the warp the whole party/guild into that map. Will the work or am I lacking something?

  5. It keeps saying I am not online. Please point out to me what is wrong with this script?  /hmm

    			mes "[ GM Controller ]";
    			mes "Input party leader name.";
    			input .@ptlead$;
    			set .@ptlead,getcharid(0,.@ptlead$);
    			set .@ptparty,getcharid(1,.@ptlead$);
    			if(!isloggedin(.@ptlead)){
    				mes "This player is offline.";
    				close;
    				end;
    			}
    			next;
    			mes "[ GM Controller ]";
    			mes "Now warping...";
    			close2;
    			sleep2 3000;
    			getmapxy(.Map$,.@x,.@y,0);
    			warpparty .Map$,.@x,.@y,.@ptparty;
    			end;
    
  6. Took a shot. Let me know if it works or not. Not tested.
     

    -	script	Nydhoggr	-1,{
    
    OnInit:
    	.Map$,"quiz_02";
    	if (mobcount(.Map$,"Nydhoggr::OnNydKill") > 0){
    		killmonster .Map$,"Nydhoggr::OnNydKill";
    	}
    	hideonnpc "Nydhoggr Keeper";
    	end;
    OnClock0000:
    OnClock0200:
    OnClock0400:
    OnClock0600:
    OnClock0800:
    OnClock1000:
    OnClock1200:
    OnClock1400:
    OnClock1600:
    OnClock1800:
    OnClock2000:
    OnClock2200:
    	hideoffnpc "Nydhoggr Keeper";
    	monster .Map$,60,345,"Nydhoggr",2022,strnpcinfo(0)+"::OnNydKill";
    OnNydKill:
    	announce strcharinfo(0)+" has slain the mighty dragon!",0;
    	hideonnpc "Nydhoggr Keeper";
    	end;
    	
    }
    
    prontera,170,180,5	script Nydhoggr Keeper	123,{
    warp "quiz_02",60,345;
    end;
    }
    
  7. Question, will event points reset every after event? If yes then you can do a query to delete the event points in the database. You can simply put OnMobKill the points gained from killing the mobs.

    After which you can do a for loop or a while loop to determine who has the most points during the event, rewarding them and then deleting the event points in the database.

  8. Hi guys, I've been having trouble testing this little piece of code because I need the script to be reset or re-select a new array every Tuesday.

    I've set this to check whether it is a Tuesday or not, but it seems it only works if I reload the server.
     

    if(gettime(4) == 2 && gettime(3) == 20){ goto NewSet; } //New Set every Tuesday
    

    I've set that under OnInit. How do I make sure that line of code will run every Tuesday?

    Solved:
     

    OnMinute00:
        if (gettime(4) == 2) { // Tuesday
            cleararray;
        }
        end;
    

    Thanks to aleos via #support channel: https://discord.gg/0XP9qqhUV9E7sb5p

  9. valkyrie,53,80,4    script    Newbies Npc    894,{
    if(##freebie == 1) goto L_1;
    
    mes "^C45AEC** Freebie **^000000";
    mes "Hello ^008080"+strcharinfo(0)+"^000000!!";
    next;
    mes "^C45AEC** Freebie **^000000";
    mes "Welcome to Ragnarok Online";
    next;
    getitem 674,9;
    getitem 14232,50;
    getitem .@item_id[rand(getarraysize(.@item_id))], 1;
    
    
    emotion e_thx;
    set ##freebie,1;
    //warp "valkyrie",48,76;
    close;
    
    L_1:
    mes "You had already received before the gift.";
    emotion e_bzz;
    close;
    end;
    
    OnInit:
    setarray .@item_id, 20159,20160,20161,19661;
    waitingroom "FREEBIES!!!",0;
    end;
    }
    

    Should set the array into OnInit. As for the Rewards thingy, I suggest what Scylla has suggested.

  10. Interesting. You can combine the woe mechanics with the mushroom event mechanics.

    Mushroom Event:

    OnMobKilled:
    set .@GID,getcharid(2);
    monster .Map$,0,0,"I'm an Emperium but looks like a Mushroom!",1902,.Spawn,strnpcinfo(0)+"::OnMobKilled";
    

    WOE:

    // Announce that the Emperium is destroyed, and respawn all but new castle-occupants.
    mapannounce strnpcinfo(2),"The emperium has been destroyed.",bc_map|bc_woe,"0x00CCFF",FW_NORMAL,12;
    MapRespawnGuildID strnpcinfo(2),.@GID,6;
    
    sleep 500; // Slow down script execution slightly.
    donpcevent "Agit#"+strnpcinfo(2)+"::OnStartArena"; //should replace this with something else to do the events
    sleep 7000;
    announce "The [" + getguildName(.@GID) + "] guild has pawned the Mushroom-like Emperium!",bc_all|bc_woe;
    end;
    

    Just need to figure out how it will be done properly

  11. Would that refresh the opened dialogue? Quite skeptical to it and leaning to the way that it won't work at all. Though it would be great, for instance a clock ticking inside an NPC dialogue would be awesome, for instance counting the minutes or seconds left until the npc is activated would be a really awesome feature. (This is kinda related to what it is TS is saying/thinking)

    This can be done using the waitingroom script command, however we do want to innovate, so why not try? xD

×
×
  • Create New...