Sign in to follow this  
Zell

Release: [SCRIPT COMMAND] Fake Player

Recommended Posts

[SCRIPT COMMAND] Fake Player


This modification allows you to create fake players without further using mob_avail for such behavior.

Usage:

[email protected] = fakeplayer( map, x, y, name, job_id, sex, hair_style, hair_color, weapon, shield, head_top, head_mid, head_bottom, option, cloth_color );


 

  • Upvote 4
  • MVP 1
  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

I compiled and it was all ok, but in the game is giving unknown command. Could you give a complete example of how to use the command?

@Zell I added yes to DEF, compiled without any errors, still giving unknown command. I will put my custom script down

script.inc script_def.inc

@Zell can you put here your script.cpp modified?  Thanks a lot

the picture did not open

image.png.a55f693eca79119b11549a6820e76794.png
Compiled everything ok, but it goes on like this. @Zell

Edited by kronobr

Share this post


Link to post
Share on other sites
On 8/27/2019 at 9:27 AM, kronobr said:

I compiled and it was all ok, but in the game is giving unknown command. Could you give a complete example of how to use the command?

Something you made wrong. If you ara receiving "Unknow command" its cause you don't add this line right "BUILDIN_DEF(fakeplayer,"siisiiiiiiiiiii")".

@monsterGID = fakeplayer( "prontera", 150, 150, "blabla", 0, 0, 1, 2, 0, 0, 1, 2, 3, 0, ! );

Try to put the modify in script.cpp so.

There is no "right" place to put it, but ok:



You can put it before this line:

static int buildin_addrid_sub(struct block_list *bl,va_list ap)

and the build_def:

image.png.ef6c3bc645a943deab5d4d67bbe602b0.png

Before BUILDIN_DEF(mes, "s*")

 

Like the title say, this is a script commands.... not a atcommand

prontera,150,150,5	Script	FakePlayer	90,{
	[email protected]_gid = fakeplayer( "prontera", 152, 152, "blabla", 0, 0, 1, 2, 0, 0, 1, 2, 3, 0, 1 );
    mes "Congrats, I summoned the monster with id " + [email protected]_gid;
    close;
}

Share this post


Link to post
Share on other sites
Posted (edited)
9 minutes ago, Zell said:

Like the title say, this is a script commands.... not a atcommand
 

prontera,150,150,5	Script	FakePlayer	90,{
	[email protected]_gid = fakeplayer( "prontera", 152, 152, "blabla", 0, 0, 1, 2, 0, 0, 1, 2, 3, 0, 1 );
    mes "Congrats, I summoned the monster with id " + [email protected]_gid;
    close;
}

OMG THANKS HEHE

for each fake player do i need an npc? @Zell
image.png.4016204fb351206bdfc83bb45a42429b.png
i think is a bug, all porings become a ''blbla'' 

Edited by kronobr

Share this post


Link to post
Share on other sites
Please make a video clip to teach me.

Share this post


Link to post
Share on other sites

I did not understand how to install, could do a little tutorial?

hello, time to compile is giving these errors does anyone know how to solve?

followed:

1>c:\users\patrimonio\documents\visual studio 2010\emulador 05082019\emulador\src\custom\script.inc(27): error C2065: 'nullptr' : undeclared identifier
1>c:\users\patrimonio\documents\visual studio 2010\emulador 05082019\emulador\src\custom\script.inc(27): warning C4047: 'initializing' : 'mob_data *' differs in levels of indirection from 'int'
1>c:\users\patrimonio\documents\visual studio 2010\emulador 05082019\emulador\src\custom\script.inc(37): error C2039: 'immune_attack' : is not a member of 'unit_data'
1>          c:\users\patrimonio\documents\visual studio 2010\emulador 05082019\emulador\src\map\unit.h(20) : see declaration of 'unit_data'

my emulator is not so current but it is a rathena emulator.

Share this post


Link to post
Share on other sites

I made a script for this one. It enables us to use it as a command. It also allows us to fully customize our fake characters. It may not be a good and clean scripting but just to give a good start for the beginners.

fakeplayercommand.txt

Is there a way to kill the created fake character? I can only killed or clear fake characters when I reload scripts. Please reply :D.

Share this post


Link to post
Share on other sites

Hi, i have a questions, once you spawn these "fake players" do they do anything?

And can you make them attack players etc.

Hope someone can enlighten me on this!

Share this post


Link to post
Share on other sites

can i suggest this fakeplayers can attack

 

Share this post


Link to post
Share on other sites
On 8/27/2019 at 12:06 PM, LearningRO said:

@Zell its something related with this issue? https://github.com/rathena/rathena/issues/4289
can you make this for NPC SPRITE?
 

Actually you already can do it with setnpcdisplay and mobavail but to talk with npc you have to hold shift (dont know if kro handle this different)

Edited by Zell

Share this post


Link to post
Share on other sites
On 9/1/2019 at 4:17 PM, Forshaken said:

I made a script for this one. It enables us to use it as a command. It also allows us to fully customize our fake characters. It may not be a good and clean scripting but just to give a good start for the beginners.

fakeplayercommand.txt 1.65 kB · 21 downloads

Is there a way to kill the created fake character? I can only killed or clear fake characters when I reload scripts. Please reply :D.

 

Yes. The command returns the fake character GID, so just store it in a array and use unitkill.

[email protected]_gid = fakeplayer( [email protected]$, [email protected], [email protected], [email protected]$, [email protected], [email protected], [email protected], @haircolor, [email protected], [email protected], [email protected], [email protected], .lowhead, [email protected], 0 );

unitkill [email protected]_gid;

Edited by Zell

Share this post


Link to post
Share on other sites
17 hours ago, VPNRO said:

can i suggest this fakeplayers can attack

 

I'm using Poring data in script, you can change the poring id in code and put whatever you want with yout agressive behavior

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this