Jump to content
  • 0

Make newly created character face forward.


Question

Posted (edited)

While this may seem trivial, but this is extremely important for my server.

 

When a player create a character, it started by facing "backwards", or "North".

 

I wanted the new character to be facing "South", I know it is somewhere in the "Char.c"

/wah

 

But how do I do this..?

 

I do not see any "Direction" option that is set when a new character is created.

 

Thank you!

 

/thx

 

Edited by gekigengar

10 answers to this question

Recommended Posts

Posted (edited)

FUN !

why not make a script command to change the player's facing

[paste=1ta6tj2tm187]

then can use

-	script	kdjhfksdjf	-1,{
OnPCLoginEvent:
	setdir DIR_SOUTH;
	end;
}
this might be useful with pushpc script command Edited by AnnieRuru
  • Upvote 1
  • 0
Posted
On 1/9/2014 at 2:07 AM, AnnieRuru said:

FUN !

why not make a script command to change the player's facing

[paste=1ta6tj2tm187]

then can use

 


-	script	kdjhfksdjf	-1,{
OnPCLoginEvent:
	setdir DIR_SOUTH;
	end;
}

this might be useful with pushpc script command

i got an error

parse_line: expect command, missing function name or calling undeclared function
*    4 :        's'etdir DIR_SOUTH;

how to fix this? @AnnieRuru

thank you!

Posted
On 1/8/2014 at 11:52 PM, clydelion said:

You can force the character to face any direction you want using pc_setdir(sd,b,h) function right after the character spawns.

Is that in script? or in the char.c itself?.

somehow I cannot find any documentation of the function pc_setdir(sd,b,h).

Anyway you can tell me how to use it in my case?

Thank you for replying!

On 1/9/2014 at 2:07 AM, AnnieRuru said:

FUN !

why not make a script command to change the player's facing

[paste=1ta6tj2tm187]

then can use


-	script	kdjhfksdjf	-1,{OnPCLoginEvent:	setdir DIR_SOUTH;	end;}
this might be useful with pushpc script command

Thats amazing /omg

This should be official!

Thanks a bunch!

 

EDIT :

Somehow I am getting errors.

1>c:\rathena\src\custom\script.inc(40): error C2065: 'SCRIPT_CMD_SUCCESS' : undeclared identifier

1>c:\rathena\src\custom\script.inc(58): error C2065: 'SCRIPT_CMD_SUCCESS' : undeclared identifier

I crai

;_;

Posted (edited)

you are not using latest rathena =/

https://github.com/rathena/rathena/blob/master/src/map/script.c#L177

add those lines you think your server is missing

 

I haven't updated since rathena moved to GIT (I have tried many times, I crai everytyme ;_;, the interface is too confusing! I really prefer SVN.) /panic

 

If I copied the entire script.c from the newest, will it conflict with other files? (Since I don't really want to update the server yet...)

(Because I can proudly say that I can't) /shy

 

(If only GIT developer were as considerate to make it more user-friendly as SVN.. that would be great!)

 

EDIT :

 

Uh oh.. I replaced my entire script.c

encountered even more errors! /omg

I think my server is done for! /panic

1>c:\rathena\src\map\script.c(6462): error C2065: 'IT_SHADOWGEAR' : undeclared identifier
1>c:\rathena\src\map\script.c(6477): error C2065: 'IT_SHADOWGEAR' : undeclared identifier
1>c:\rathena\src\map\script.c(6644): warning C4020: 'itemdb_searchrandomid' : too many actual parameters
1>c:\rathena\src\map\script.c(7358): error C2065: 'EQP_SHADOW_ARMOR' : undeclared identifier
1>c:\rathena\src\map\script.c(7358): error C2099: initializer is not a constant
1>c:\rathena\src\map\script.c(7358): error C2065: 'EQP_SHADOW_WEAPON' : undeclared identifier
1>c:\rathena\src\map\script.c(7358): error C2099: initializer is not a constant
1>c:\rathena\src\map\script.c(7358): error C2065: 'EQP_SHADOW_SHIELD' : undeclared identifier
1>c:\rathena\src\map\script.c(7358): error C2099: initializer is not a constant
1>c:\rathena\src\map\script.c(7358): error C2065: 'EQP_SHADOW_SHOES' : undeclared identifier
1>c:\rathena\src\map\script.c(7358): error C2099: initializer is not a constant
1>c:\rathena\src\map\script.c(7358): error C2065: 'EQP_SHADOW_ACC_R' : undeclared identifier
1>c:\rathena\src\map\script.c(7358): error C2099: initializer is not a constant
1>c:\rathena\src\map\script.c(7358): error C2065: 'EQP_SHADOW_ACC_L' : undeclared identifier
1>c:\rathena\src\map\script.c(7358): error C2099: initializer is not a constant
1>c:\rathena\src\map\script.c(11311): error C2039: 'mob_id' : is not a member of 'mob_data'
1> c:\rathena\src\map\mob.h(114) : see declaration of 'mob_data'
1>c:\rathena\src\map\script.c(15015): error C2065: 'ITEMSHOP' : undeclared identifier
1>c:\rathena\src\map\script.c(15015): error C2065: 'POINTSHOP' : undeclared identifier
1>c:\rathena\src\map\script.c(15022): error C2065: 'ITEMSHOP' : undeclared identifier
1>c:\rathena\src\map\script.c(15022): error C2065: 'POINTSHOP' : undeclared identifier
1>c:\rathena\src\map\script.c(15049): error C2065: 'ITEMSHOP' : undeclared identifier
1>c:\rathena\src\map\script.c(15049): error C2065: 'POINTSHOP' : undeclared identifier
1>c:\rathena\src\map\script.c(15078): error C2065: 'ITEMSHOP' : undeclared identifier
1>c:\rathena\src\map\script.c(15078): error C2065: 'POINTSHOP' : undeclared identifier
1>c:\rathena\src\map\script.c(15109): error C2065: 'ITEMSHOP' : undeclared identifier
1>c:\rathena\src\map\script.c(15109): error C2065: 'POINTSHOP' : undeclared identifier
1>c:\rathena\src\map\script.c(16954): error C2039: 'mob_id' : is not a member of 'mob_data'
1> c:\rathena\src\map\mob.h(114) : see declaration of 'mob_data'
1>c:\rathena\src\map\script.c(17538): warning C4020: 'itemdb_searchrandomid' : too many actual parameters
1>c:\rathena\src\map\script.c(17547): warning C4013: 'itemdb_get_randgroupitem_count' undefined; assuming extern returning int
1>c:\rathena\src\map\script.c(17583): warning C4013: 'itemdb_pc_get_itemgroup' undefined; assuming extern returning int
1>c:\rathena\src\map\script.c(18063): error C2065: 'VIP_SCRIPT' : undeclared identifier
1>c:\rathena\src\map\script.c(18064): error C2065: 'MIN_STORAGE' : undeclared identifier
1>c:\rathena\src\map\script.c(18206): error C2039: 'mon_trans_disable_in_gvg' : is not a member of 'Battle_Config'
1> c:\rathena\src\map\battle.h(111) : see declaration of 'Battle_Config'
1>c:\rathena\src\map\script.c(18218): error C2065: 'SC_MONSTER_TRANSFORM' : undeclared identifier
1>c:\rathena\src\map\script.c(18219): error C2065: 'SC_MONSTER_TRANSFORM' : undeclared identifier
1>c:\rathena\src\map\script.c(18263): error C2065: 'MAX_PC_BONUS_SCRIPT' : undeclared identifier
1>c:\rathena\src\map\script.c(18263): error C2039: 'bonus_script' : is not a member of 'map_session_data'
1> c:\rathena\src\map\pc.h(131) : see declaration of 'map_session_data'
1>c:\rathena\src\map\script.c(18263): error C2039: 'bonus_script' : is not a member of 'map_session_data'
1> c:\rathena\src\map\pc.h(131) : see declaration of 'map_session_data'
1>c:\rathena\src\map\script.c(18263): error C2039: 'bonus_script' : is not a member of 'map_session_data'
1> c:\rathena\src\map\pc.h(131) : see declaration of 'map_session_data'
1>c:\rathena\src\map\script.c(18263): error C2198: 'strcmp' : too few arguments for call
1>c:\rathena\src\map\script.c(18264): error C2065: 'MAX_PC_BONUS_SCRIPT' : undeclared identifier
1>c:\rathena\src\map\script.c(18275): error C2065: 'MAX_PC_BONUS_SCRIPT' : undeclared identifier
1>c:\rathena\src\map\script.c(18275): error C2039: 'bonus_script' : is not a member of 'map_session_data'
1> c:\rathena\src\map\pc.h(131) : see declaration of 'map_session_data'
1>c:\rathena\src\map\script.c(18276): error C2065: 'MAX_PC_BONUS_SCRIPT' : undeclared identifier
1>c:\rathena\src\map\script.c(18277): error C2065: 'MAX_PC_BONUS_SCRIPT' : undeclared identifier
1>c:\rathena\src\map\script.c(18282): error C2039: 'bonus_script' : is not a member of 'map_session_data'
1> c:\rathena\src\map\pc.h(131) : see declaration of 'map_session_data'
1>c:\rathena\src\map\script.c(18282): warning C4090: 'function' : different 'const' qualifiers
1>c:\rathena\src\map\script.c(18282): warning C4022: 'memcpy' : pointer mismatch for actual parameter 2
1>c:\rathena\src\map\script.c(18282): error C2198: 'memcpy' : too few arguments for call
1>c:\rathena\src\map\script.c(18283): error C2039: 'bonus_script' : is not a member of 'map_session_data'
1> c:\rathena\src\map\pc.h(131) : see declaration of 'map_session_data'
1>c:\rathena\src\map\script.c(18284): error C2039: 'bonus_script' : is not a member of 'map_session_data'
1> c:\rathena\src\map\pc.h(131) : see declaration of 'map_session_data'
1>c:\rathena\src\map\script.c(18285): error C2039: 'bonus_script' : is not a member of 'map_session_data'
1> c:\rathena\src\map\pc.h(131) : see declaration of 'map_session_data'
1>c:\rathena\src\map\script.c(18286): error C2039: 'bonus_script' : is not a member of 'map_session_data'
1> c:\rathena\src\map\pc.h(131) : see declaration of 'map_session_data'
1>c:\rathena\src\map\script.c(18287): error C2039: 'bonus_script' : is not a member of 'map_session_data'
1> c:\rathena\src\map\pc.h(131) : see declaration of 'map_session_data'
1>c:\rathena\src\map\script.c(18289): error C2039: 'bonus_script' : is not a member of 'map_session_data'
1> c:\rathena\src\map\pc.h(131) : see declaration of 'map_session_data'
1>c:\rathena\src\map\script.c(18290): error C2039: 'bonus_script' : is not a member of 'map_session_data'
1> c:\rathena\src\map\pc.h(131) : see declaration of 'map_session_data'
1>c:\rathena\src\map\script.c(18290): error C2198: 'clif_status_change' : too few arguments for call

*Enters Panic State*

*Run around havoc in my room*

*Rolls around*

*Crai everytyme*

Edited by gekigengar
Posted

no

instead of using tortoiseSVN last year, now I'm using tortoiseGIT

its made by same company, so the interface isn't far off

you'll get used to it once you get your hands on tortoiseGIT

actually, just add this line

#define SCRIPT_CMD_SUCCESS 0
should make my patch work on your server already
  • Upvote 1
Posted

no

instead of using tortoiseSVN last year, now I'm using tortoiseGIT

its made by same company, so the interface isn't far off

you'll get used to it once you get your hands on tortoiseGIT

actually, just add this line

#define SCRIPT_CMD_SUCCESS 0
should make my patch work on your server already

 

That worked well!, Thanks!

Join the conversation

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

Guest
Answer this question...

×   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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...