Jump to content

Aeromesi

Support Leaders
  • Content Count

    821
  • Joined

  • Last visited

  • Days Won

    43

Posts posted by Aeromesi


  1.  

    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!  ;)

    Glad I could help. I would have coded it but last night I wasn't in the right frame of mind. Lol Happy new years!


  2. All I can think about is using atcommand "@hide" set the player status like "IsHidden" to true/false, they die on a certain cell (save using getmapxy upon OnPcDieEvent of death coordinates) auto raise them and warp them to a different spot where they'd have to find that cell to get rid of the IsHidden status. Also you'll need OnPCLogoutEvent/OnPCLoginEvent or something similar if they logout / login to maybe set their hidden status back to 0? the problem I see is atcommand "@hide" effect will have been taken off automatically if dc/relog anyway.

    I know there was something like @monsterignore or some kind of command that basically made monsters ignore you and you couldn't attack the monsters either... if you had that mod you could even save there "IsHidden" status when they login and set them back to being hidden incase of internet interruption


  3. Ironic time to post, merry Christmas btw Hercules!

    I just received my new PC a couple days ago but just yesterday I got my own monitor for it, so now I'm back at it. Let's hope I can muster something up for a Christmas treat. ^^


    PS: First time using Windows 10, amg  :hmm:  :sob:  :omg:  :swt3:


    Upgraded from 4GB -> 16GB

    GTX 550 Ti -> Radeon R9 280x

    Finally :o though my brother has a GTX 1060 so I have nothing still xD


  4. Are you just trying to obtain all the custom items in your inventory? Your script makes me clueless what you're really trying to achieve.. >.< whatever logics going on I have hard time grasping... from what I can tell is

     

     

    For item ID 18660 is less than 19223 "perform operation." Which is adding .@i until become 19223. will always be greater than 100 because it starts at 18660. I just suggest maybe better explanation or better grasp on script_commands.txt in our public github repo.. unless I'm only one confused someone please help our fellow Hercules user.


  5.  

    Get all the dragon balls and you may have your wish....

     

    All puns aside;

     

    I would assume you can find the texture/effect for "@clouds" command and recolor them to yellow? Any thought on this?

     

    thanks Aeromesi

     

    Solved!

    So I was right? Yay! xD

×
×
  • Create New...

Important Information

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