Audited Barada and the TCG Barn Ranchhand conversation scripts.

This commit is contained in:
Cekis
2016-04-23 08:06:56 +01:00
parent 21acb63834
commit a8fbc4a9fa
3 changed files with 152 additions and 560 deletions
@@ -99,4 +99,30 @@ public class conversation_base extends script.base_script
return SCRIPT_CONTINUE;
}
protected int craft_response_prose(String[] responseStrings, int branchId, obj_id player, obj_id self, String name) throws InterruptedException{
string_id message = new string_id(c_stringFile, responseStrings[0]);
string_id responses[] = new string_id[responseStrings.length];
for(int i = 1; i < responseStrings.length; i++){
responses[i] = new string_id(c_stringFile, responseStrings[i]);
}
if(responses.length > 1){
utils.setScriptVar(player, conversation + ".branchId", branchId);
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(self);
pp.other.set(name);
npcStartConversation(player, self, scriptName, null, pp, responses);
}
else
{
prose_package pp = new prose_package();
pp.stringId = message;
pp.actor.set(player);
pp.target.set(self);
pp.other.set(name);
chat.chat(self, player, null, null, pp);
}
return SCRIPT_CONTINUE;
}
}