hey there, i've some functions to add to your list for npc coding
JavaScript:
String getConverationPartnerAffinity()
return ship or object affiliation
return "none" if there's no affiliation
JavaScript:
String getConverationPartnerFactionName()
return faction name
return "neutral" for fid = 0
return "unknown" for fid = null
JavaScript:
String getConverationPartnerOwnerName()
return player owner name or "none"
return NPC's name
JavaScript:
String getConverationParterName()
return NPC's name
return script name
JavaScript:
String getConversationState()
return state or "none"
JavaScript:
boolean isConverationPartnerInTeam()
return true or false
JavaScript:
boolean isAtBlock(int x, int y, int z)
test if NPC is at x,y,z
return true or false
JavaScript:
int setConversationState(String paramString)
change conversation state
return 0
return -1 on error
JavaScript:
int giveType(short type, int count)
give block id
return 0
return -1 on error
JavaScript:
int giveGravity(boolean paramBoolean)
enable/disable gravity for player
return 0 on disabled
return 1 on enabled
return -1 on error
JavaScript:
int destroyShip(String entityName)
destroy entity with name entityName
return 1
return -1 on error
JavaScript:
int callTutorial(String folderName)
call the tutorial inside */StarMade/data/tutorial/folderName
return 0
JavaScript:
int moveTo(int x, int y, int z)
move NPC to x,y,z
return -1
JavaScript:
int giveBuildProhibiter(int credits)
give buil prohibiter for defined amount of credits
return 0 no error
return -1 not enought credits
return -2 inventory full
JavaScript:
int giveFlashLight(int credits)
give flashlight for defined amount of credits
return 0 no error
return -1 not enought credits
return -2 inventory full
JavaScript:
int giveGrappleBeam(int credits)
give grapple beam for defined amount of credits
return 0 no error
return -1 not enought credits
return -2 inventory full
JavaScript:
int giveHealingBeam(int credits)
give healing beam for defined amount of credits
return 0 no error
return -1 not enought credits
return -2 inventory full
JavaScript:
int giveHelmet(int credits)
give helmet for defined amount of credits
return 0 no error
return -1 not enought credits
return -2 inventory full
JavaScript:
int giveLaserWeapon(int credits)
give laser weapon for defined amount of credits
return 0 no error
return -1 not enought credits
return -2 inventory full
JavaScript:
int giveMarkerBeam(int credits)
give marker beam for defined amount of credits
return 0 no error
return -1 not enought credits
return -2 inventory full
JavaScript:
int givePowerSupplyBeam(int credits)
give power supply beam for defined amount of credits
return 0 no error
return -1 not enought credits
return -2 inventory full
JavaScript:
int giveRocketLauncher(int credits)
give Rocket launcher for defined amount of credits
return 0 no error
return -1 not enought credits
return -2 inventory full
JavaScript:
int giveLaserWeapon(int credits)
give laser weapon for defined amount of credits
return 0 no error
return -1 not enought credits
return -2 inventory full
JavaScript:
int giveSniperRifle(int credits)
give sniper rifle for defined amount of credits
return 0 no error
return -1 not enought credits
return -2 inventory full
JavaScript:
int giveTorchBeam(int credits)
give torch beam for defined amount of credits
return 0 no error
return -1 not enought credits
return -2 inventory full
JavaScript:
int giveTransporterMarkerBeam(int credits)
give transporter marker beam for defined amount of credits
return 0 no error
return -1 not enought credits
return -2 inventory full
JavaScript:
int spawnCrew(int credits)
spawn a new crew member for amount of credits
return 0 no error
return -1 not enought credits
return -2 player has 5 cew member
JavaScript:
int unhireConverationPartner()
unhire NPC
return 0
return -1 if NPC isn't in team
JavaScript:
int hireConverationPartner()
hire NPC
return 0
return -2 if player already has 5 crew member
return -3 if player has a diffrent faction id
JavaScript:
int activateBlock(int x, int y, int z, boolean paramBoolean)
enable/desable block at x,y,z
return 0 on disabled
return 1 on enabled
return -1 on error
JavaScript:
int activateBlockSwitch(int x, int y, int z)
toggle activation block at x,y,z
return 0
return -1 on error